/* SECTION: Global Styles - Base layout and typography */
/*
 * Purpose: Sets up the overall page layout with modern typography and mobile-friendly design.
 * Key Features:
 * - Centers content with a **gradient** background.
 * - Uses **Poppins** font for a modern, clean look.
 * - Ensures **responsive** padding and margins for all devices.
*/
body {
    font-family: 'Poppins', Arial, sans-serif;
    background: linear-gradient(135deg, #F5F6F5 0%, #e0e4e8 100%);
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* SECTION: Container Styles - Main content wrapper */
/*
 * Purpose: Styles the main container with a gradient and shadow, optimized for mobile.
 * Key Features:
 * - Uses a **gradient** background with **rounded** corners.
 * - Scales width responsively for **mobile** and desktop.
 * - Applies **glow** effect with shadow for depth.
*/
.container {
    background: linear-gradient(145deg, #ffffff, #f0f2f5);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 700px;
    position: relative;
    overflow: hidden;
}

/* Purpose: Header styling with flair */
h1 {
    color: #003087;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Purpose: Header icon styling */
h1 i {
    color: #E30613;
    margin-right: 10px;
}

/* SECTION: Form Styles - Input fields and controls */
/*
 * Purpose: Styles form elements with modern, animated effects and touch-friendly design.
 * Key Features:
 * - Uses **flexbox** for responsive layout across devices.
 * - Applies **red** (#E30613) and **blue** (#003087) for accents.
 * - Includes **hover** and **focus** animations with **larger** touch targets.
*/
.form-group {
    margin-bottom: 20px;
}

/* Purpose: Label styling with icons */
label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: #003087;
    font-size: 1rem;
}

/* Purpose: Label icon styling */
label i {
    margin-right: 8px;
    color: #E30613;
}

/* Purpose: Input and textarea styling */
input[type="number"], textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Purpose: Textarea specific styling */
textarea {
    resize: vertical; /* Restrict resizing to vertical only */
}

/* Purpose: Input focus effect */
input[type="number"]:focus, textarea:focus {
    border-color: #003087;
    box-shadow: 0 0 8px rgba(0, 48, 135, 0.3);
    outline: none;
}

/* Purpose: Button group styling */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Purpose: Primary button styling */
button {
    background: linear-gradient(90deg, #E30613, #c20510);
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 48px; /* Touch-friendly height */
}

/* Purpose: Primary button hover effect */
button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(227, 6, 19, 0.4);
}

/* Purpose: Secondary button styling (download and load) */
#downloadList, #loadListButton {
    background: linear-gradient(90deg, #003087, #00205b);
}

/* Purpose: Secondary button hover effect */
#downloadList:hover, #loadListButton:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 48, 135, 0.4);
}

/* SECTION: Team Output Styles - Generated team display */
/*
 * Purpose: Styles the output area with animated team cards, optimized for mobile.
 * Key Features:
 * - Uses **flex** layout for team cards with **animations**.
 * - Applies **blue** (#003087) for headers and **red** (#E30613) for counts.
 * - Ensures **scrollable** content with **touch-friendly** hover effects.
*/
.teams {
    margin-top: 30px;
}

/* Purpose: Individual team styling */
.team {
    background: #F5F6F5;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
}

/* Purpose: Team hover effect */
.team:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Purpose: Team fade-in animation */
.team.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Purpose: Team header styling */
.team h3 {
    color: #003087;
    margin-top: 0;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Purpose: Member count styling */
.member-count {
    color: #E30613;
    font-weight: normal;
}

/* Purpose: Team list styling */
.team ul {
    list-style: none;
    padding: 0;
}

/* Purpose: Team member styling */
.team li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e4e8;
    font-size: 1rem;
}

/* Purpose: Last team member styling */
.team li:last-child {
    border-bottom: none;
}

/* SECTION: Footer Styles - Subtle branding */
/*
 * Purpose: Styles the footer with a minimalistic, mobile-friendly design.
 * Key Features:
 * - Uses **red** (#E30613) for heart icon.
 * - Centers text for a **clean** finish.
*/
footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
}

/* Purpose: Footer heart icon styling */
footer i {
    color: #E30613;
}

/* SECTION: Responsive Styles - Mobile optimizations */
/*
 * Purpose: Ensures the UI is touch-friendly and scales well on mobile devices.
 * Key Features:
 * - Adjusts **font sizes** and **padding** for smaller screens.
 * - Stacks **button group** vertically on narrow screens.
 * - Optimizes **container** width for mobile.
*/
@media (max-width: 600px) {
    /* Purpose: Adjust container padding */
    .container {
        padding: 15px;
    }

    /* Purpose: Reduce header font size */
    h1 {
        font-size: 1.5rem;
    }

    /* Purpose: Stack button group vertically */
    .button-group {
        flex-direction: column;
    }

    /* Purpose: Adjust button padding */
    button {
        padding: 10px;
        min-height: 44px;
    }

    /* Purpose: Adjust input and textarea font size */
    input[type="number"], textarea {
        font-size: 0.9rem;
        padding: 10px;
    }

    /* Purpose: Adjust team card padding */
    .team {
        padding: 15px;
    }

    /* Purpose: Adjust team header font size */
    .team h3 {
        font-size: 1rem;
    }

    /* Purpose: Adjust team member font size */
    .team li {
        font-size: 0.9rem;
    }
}