* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    padding: 40px 20px;
}

h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.search-box {
    max-width: 600px;
    margin: 30px auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.codelabs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.codelab-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.codelab-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.codelab-card h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.codelab-card .summary {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.codelab-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: #888;
}

.meta-item svg {
    width: 16px;
    height: 16px;
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    color: #666;
}

.cta-button {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    margin-top: 15px;
    transition: background 0.3s;
}

.cta-button:hover {
    background: #5568d3;
}

footer {
    text-align: center;
    color: white;
    padding: 40px 20px;
    margin-top: 60px;
    opacity: 0.9;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    display: block;
}

.stat-label {
    opacity: 0.9;
    margin-top: 5px;
}

.no-results {
    text-align: center;
    color: white;
    padding: 40px;
    font-size: 1.2em;
    display: none;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    padding: 20px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    color: white;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Container */
.error-container {
    background: rgba(255, 59, 48, 0.9);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .codelabs-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        gap: 20px;
    }

    .pagination-container {
        flex-direction: column;
        gap: 15px;
    }

    .pagination-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Smooth transitions */
.codelab-card,
.pagination-btn,
.search-box input {
    transition: all 0.3s ease;
}
