/* 1. Variables & Base Setup */
:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --card-hover: #334155;
    --text-color: #f8fafc;
    --accent-color: #38bdf8;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    /* Space at the very top of the page */
    padding-top: 50px; 
    padding-bottom: 50px;
}

/* 2. Back Button (Pinned to Top Left) */
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.9rem;
    background-color: var(--card-bg);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: var(--card-hover);
    color: var(--accent-color);
    transform: translateX(-3px);
}

/* 3. Header & Photo Area (Tightened Spacing) */
header {
    margin-bottom: 1.5rem; 
    text-align: center;
    width: 90%;
}

.header-image {
    display: block;
    margin: 0 auto 0.75rem auto; /* Tight margin above/below photo */
    max-width: 100%;
    height: auto;
    width: 140px; /* Nice prominent size */
    border-radius: 20px;
    object-fit: cover;
}

header h1 {
    font-size: 2.2rem; /* Big, bold title */
    margin: 0;
    letter-spacing: -0.025em;
    color: var(--accent-color);
}

/* 4. Container for Cards */
.container {
    width: 90%;
    /* Max-width prevents buttons from getting too wide on desktop */
    max-width: 600px; 
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center; /* Keeps cards centered */
}

/* 5. The "Big Rounded Rectangle" Cards */
.category-card {
    display: flex;
    align-items: center;
    width: 100%; /* Spans the full 500px or mobile width */
    background-color: var(--card-bg);
    border-radius: 28px;
    padding: 2.2rem 2.5rem; 
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    border: 2px solid transparent;
    box-sizing: border-box; /* Crucial: keeps padding inside the 100% width */
}

.category-card:hover {
    transform: scale(1.02); /* Slight "pop" effect instead of just moving up */
    background-color: var(--card-hover);
    border-color: var(--accent-color);
}

.icon {
    font-size: 2.5rem; /* Large icons */
    margin-right: 2rem;
    width: 70px;
    text-align: center;
}

.category-name {
    font-size: 2rem;
    font-weight: 700;
    white-space: nowrap; /* Prevents text from wrapping to a second line */
}

/* 6. Mobile Responsiveness */
@media (max-width: 600px) {
    body {
        padding-top: 80px; /* Room for the back button */
    }
    
    .container {
        max-width: 100%; 
    }

    .back-button {
        top: 15px;
        left: 15px;
        padding: 0.5rem 0.8rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .category-card {
        padding: 2rem 1.5rem;
        border-radius: 22px;
    }

    .category-name {
        font-size: 1.6rem;
    }

    .icon {
        font-size: 2.5rem;
        margin-right: 1.2rem;
        width: 50px;
    }
}