/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main content */
main {
    flex: 1;
}

.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Switch to list view when more than 3 items */
.pages-grid:has(.page-card:nth-child(4)) {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Card styles */
.page-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* List view styles for 4+ items */
.pages-grid:has(.page-card:nth-child(4)) .page-card {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 1.5rem;
    border-radius: 5px;
}

.pages-grid:has(.page-card:nth-child(4)) .card-icon {
    font-size: 2rem;
    margin-bottom: 0;
    margin-right: 1.2rem;
    flex-shrink: 0;
}

.pages-grid:has(.page-card:nth-child(4)) .card-content {
    flex: 1;
}

.pages-grid:has(.page-card:nth-child(4)) .page-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.pages-grid:has(.page-card:nth-child(4)) .page-card p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.pages-grid:has(.page-card:nth-child(4)) .card-link {
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.page-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.page-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.page-card.coming-soon {
    opacity: 0.7;
}

.page-card.coming-soon:hover {
    transform: translateY(-2px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.page-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.page-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.card-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.card-link.disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .pages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .page-card {
        padding: 1.5rem;
    }
    
    .card-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .page-card {
        padding: 1rem;
    }
    
    .card-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}