/* styles.css - Pioneer DJ Convention Voting System Styles */

/* --- COLOR VARIABLES --- */
:root {
    /* Deep blue/purple background (Based on your screenshots) */
    --color-bg: #0A0F38; 
    /* Primary accent color (Vibrant Orange/Red for Pioneer branding feel) */
    --color-accent: #FF5722; 
    /* Secondary accent for shadows/glow */
    --color-secondary-accent: #FFCC80; 
    --color-text: #FFFFFF;
    --color-text-subtle: #AAAAAA;
    /* Darker background for the header, footer, and cards */
    --card-bg: #1B215B; 
    --color-disabled: #4A5080; /* Disabled button/subtle text color */
    --color-gold: #FFD700; /* NEW: Gold color for winner */
}

/* --- BASE STYLES --- */
body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Inter', sans-serif; /* Using a modern font */
    margin: 0;
    padding: 0;
}

main {
    padding: 20px;
}

h1 {
    color: var(--color-text);
    text-align: center;
    margin-top: 30px;
    font-size: 2.5em;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: var(--color-text-subtle);
    font-size: 1.1em;
    margin-bottom: 40px;
}

/* Header and Footer styles */
header, footer {
    background-color: var(--card-bg);
    color: var(--color-text);
    padding: 15px 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Header Container */
header {
    display: block;
    text-align: center;
}

.header-content {
    /* Updated for a centered, stacked layout on mobile */
    display: flex;
    flex-direction: column; 
    align-items: center; 
    max-width: 1400px;
    margin: 0 auto; 
}

.logo-image {
    height: 50px; 
    margin-bottom: 10px; 
}

/* Navigation Links */
header nav {
    margin-bottom: 5px;
}

header nav a {
    color: var(--color-text);
    text-decoration: none;
    margin: 0 15px; 
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

header nav a:hover, header nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
}


footer {
    padding: 20px 40px;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.9em;
}

/* Footer Nav Styling */
footer .footer-nav a {
    color: var(--color-text-subtle);
    text-decoration: none;
    transition: color 0.2s;
}

footer .footer-nav a:hover {
    color: var(--color-accent);
}

/* --- VOTING GRID LAYOUT (Desktop Default: 3 Columns) --- */
.voting-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Creates three equal columns */
    gap: 30px; 
    padding: 20px 40px; 
    max-width: 1400px; 
    margin: 0 auto; /* Centers the grid container */
}

/* --- DJ CARD STYLING --- */
.dj-card {
    background-color: var(--card-bg);
    padding: 25px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(25, 30, 80, 0.8); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dj-card:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 87, 34, 0.2);
}

/* --- PROFILE PICTURE and GLOW EFFECT (Standard) --- */
.dj-photo-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 6px solid var(--color-disabled); 
    transition: border 0.4s ease, box-shadow 0.4s ease;
}

.dj-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%; /* Circular image */
    object-fit: cover;
    display: block;
}

/* The Vibrant Orange Glow Effect on Hover */
.dj-card:hover .dj-photo-wrapper {
    border-color: var(--color-accent);
    box-shadow: 
        0 0 15px var(--color-accent), 
        0 0 30px var(--color-secondary-accent); /* Outer soft glow */
    animation: pulse 1.8s infinite alternate; 
}

@keyframes pulse {
    0% { box-shadow: 0 0 10px var(--color-accent), 0 0 20px rgba(255, 87, 34, 0.5); }
    100% { box-shadow: 0 0 20px var(--color-accent), 0 0 40px rgba(255, 87, 34, 0.9); }
}

/* --- CARD TEXT AND BUTTONS --- */
.dj-name {
    color: var(--color-text);
    margin-bottom: 10px;
    font-size: 1.5em;
    font-weight: 600;
}

.vote-count-label {
    color: var(--color-text-subtle);
    font-size: 0.9em;
    display: block;
}

.vote-count {
    font-size: 2em;
    font-weight: bold;
    color: var(--color-accent); 
    display: block;
    margin-top: 5px;
    margin-bottom: 15px;
}

/* Voting Button Styling */
.vote-button {
    width: 100%; 
    display: block;
    box-sizing: border-box;
    padding: 12px 0;
    background-color: var(--color-accent);
    color: var(--color-text);
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 6px;
    transition: background-color 0.2s, opacity 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
}

.vote-button:hover:not(:disabled) {
    background-color: #E64A19; /* Slightly darker orange on hover */
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.5);
}

.vote-button:disabled {
    background-color: var(--color-disabled); /* Grayed out */
    color: var(--color-text-subtle);
    cursor: not-allowed;
    opacity: 0.7;
}

.vote-message-already {
    color: var(--color-accent);
    font-size: 0.9em;
    margin-top: 10px;
}


/* --- LEADERBOARD SPECIFIC STYLING --- */

.leaderboard-list {
    max-width: 800px;
    margin: 40px auto;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: background-color 0.3s;
}

/* Highlight the rank 1 item */
.leaderboard-item:nth-child(1) {
    background-color: #384073; 
    border: 2px solid var(--color-gold);
}

.leaderboard-details {
    display: flex;
    align-items: center;
}

.leaderboard-item .dj-photo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

.rank {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--color-accent);
    width: 40px;
    text-align: center;
}

.score {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--color-accent);
}

/* --- WINNER PAGE STYLING (NEW) --- */
.winner-section {
    padding: 20px 40px;
}

.winner-container {
    display: flex;
    justify-content: center; /* Center the winner card(s) */
    flex-wrap: wrap; /* Allow wrapping if multiple winners (tie) */
    gap: 40px;
    margin-top: 50px;
}

.winner-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    /* Massive gold shadow to highlight the winner */
    box-shadow: 0 0 40px var(--color-gold), 0 0 80px rgba(255, 215, 0, 0.5);
    border: 5px solid var(--color-gold);
    max-width: 300px;
    width: 100%;
    transform: scale(1.05); /* Make it pop */
}

.winner-photo-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 50%;
    margin-bottom: 25px;
    /* Use the gold color for the winner's frame */
    border: 8px solid var(--color-gold); 
    box-shadow: 0 0 20px var(--color-gold), 0 0 40px rgba(255, 215, 0, 0.7);
}

.winner-photo-wrapper .dj-photo {
    width: 200px;
    height: 200px;
}

.winner-name {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--color-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
    margin-bottom: 10px;
}

.final-vote-count {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--color-text);
    display: block;
}

/* --- LOGIN PAGE STYLING (NEW) --- */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh; /* Make it nearly full height */
    padding: 20px;
}

.login-card {
    background-color: var(--card-bg);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 40px rgba(25, 30, 80, 0.8);
    max-width: 400px;
    width: 100%;
    text-align: center; /* Center h1 and subtitle */
}

.login-card h1, .login-card .subtitle {
    text-align: center;
    margin-top: 0;
}

.login-form {
    text-align: left;
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-text-subtle);
    font-size: 0.9em;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    background-color: var(--color-bg); /* Use the darker background */
    color: var(--color-text);
    border: 1px solid var(--color-disabled);
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.5); /* Accent glow */
    outline: none;
}

.auth-button {
    /* Inherit the primary button styles for consistency */
    width: 100%;
    display: block;
    box-sizing: border-box;
    padding: 12px 0;
    background-color: var(--color-accent);
    color: var(--color-text);
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 6px;
    transition: background-color 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    margin-top: 10px;
}

.auth-button:hover {
    background-color: #E64A19;
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.5);
}

.message-box.error {
    background-color: #5B2121; /* Dark red background */
    color: #FF7777; /* Light red text */
    border: 1px solid #FF4444;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.95em;
}


/* --- RESPONSIVENESS MEDIA QUERIES --- */

/* Tablet Breakpoint: 2 Columns */
@media (max-width: 992px) {
    .voting-container {
        /* Change the grid to display 2 columns */
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }
}


/* Mobile Phone Breakpoint: 1 Column */
@media (max-width: 600px) {
    header, footer {
        padding: 10px 20px;
    }
    
    .header-content {
        /* Ensure logo and nav stack vertically */
        flex-direction: column; 
    }
    
    header nav {
        margin-top: 5px;
    }

    header nav a {
        margin: 0 8px;
        font-size: 0.9em;
    }

    /* Change the grid to display a single column */
    .voting-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }

    .dj-card {
        padding: 20px 15px;
    }

    /* Shrink photo and text on small screens */
    .dj-photo {
        width: 120px;
        height: 120px;
    }
    
    .dj-name {
        font-size: 1.3em;
    }

    .vote-button {
        padding: 10px 0;
        font-size: 1em;
    }

    /* Leaderboard adjustments for mobile */
    .leaderboard-item {
        padding: 15px 10px;
    }

    .rank {
        font-size: 1.2em;
    }
    .score {
        font-size: 1.5em;
    }

    /* Winner page adjustments for mobile */
    .winner-card {
        padding: 25px;
        transform: scale(1);
    }

    .winner-photo-wrapper .dj-photo {
        width: 150px;
        height: 150px;
    }

    .winner-name {
        font-size: 2em;
    }
    
    /* Mobile adjustment for login card */
    .login-card {
        padding: 25px 20px;
    }
}
/* This CSS should be added to your main stylesheet, 
    which appears to be linked in your PHP header partial.
*/
.logo-image {
    /* Sets the requested dimensions for the logo image */
    width: 243px; 
    height: 150px;
    
    /* Ensure the image scales correctly within the defined boundaries */
    object-fit: contain; 
}
/* You might also need to adjust the header padding/height if the logo is now much larger */
header {
    /* Example: Add padding to keep the content centered vertically 
       You may need to adjust this value based on the logo height (150px)
    */
    padding: 10px 0; 
}

.header-content {
    /* Ensure the content aligns vertically */
    display: flex;
    align-items: center; 
}