/* Ballot Blocks Styles */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Source+Sans+Pro:wght@400;600;700&display=swap');
:root {
    --primary-color: #0a2533; /* Dark blue/teal from logo */
    --accent-color: #e74c3c; /* Red from logo */
    --trump-color: #e74c3c; /* Red for Trump */
    --harris-color: #2980b9; /* Blue for Harris */
    --light-text: #ffffff;
    --dark-text: #0a2533;
    --background-light: #f8e8d4; /* Cream/beige from logo */
    --button-radius: 25px;
}

/* Mouse cursor overlay */
.cursor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/noun-cursor-mouse-5678845-FFFFFF.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100px;
    pointer-events: none; /* Allow clicks to pass through */
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Source Sans Pro', sans-serif;
}

body {
    background-color: var(--primary-color);
    background-image: 
        linear-gradient(rgba(10, 37, 51, 0.9), rgba(10, 37, 51, 0.9)),
        repeating-linear-gradient(45deg, rgba(248, 232, 212, 0.05) 0px, rgba(248, 232, 212, 0.05) 2px, transparent 2px, transparent 10px);
    color: var(--light-text);
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent scrolling */
    display: flex;
    flex-direction: column;
}

header {
    background-color: rgba(10, 37, 51, 0.7);
    background-image: linear-gradient(to right, rgba(41, 128, 185, 0.1), rgba(231, 76, 60, 0.1));
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(248, 232, 212, 0.2);
    position: relative;
    z-index: 10;
}

.logo-image {
    height: 80px;
    width: auto;
    margin: 5px 0;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.score-container {
    font-size: 1.2rem;
    background-color: rgba(248, 232, 212, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(248, 232, 212, 0.3);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.game-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

@keyframes container-glow {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    100% {
        box-shadow: 0 4px 25px rgba(231, 76, 60, 0.2), 0 4px 25px rgba(41, 128, 185, 0.2);
    }
}

#street-view-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-indicator, .error-message {
    text-align: center;
    padding: 2rem;
    color: var(--light-text);
}

.loading-indicator p, .error-message p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: absolute;
    bottom: 80px; /* Increased to prevent footer overlap */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Center properly */
    z-index: 10;
    background-color: rgba(10, 37, 51, 0.7);
    padding: 1rem;
    border-radius: 10px;
    margin: 0; /* Remove auto margins */
    max-width: 350px; /* Reduced width for side positioning */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.game-info p {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    line-height: 1.4;
}

#location-info {
    text-align: center;
    padding: 1rem;
}

#location-info p {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    margin-bottom: 0.8rem;
}

.hint-button {
    background-color: var(--accent-color);
    color: var(--light-text);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: var(--button-radius);
    font-size: 1rem;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.3s, background-color 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hint-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.hint-button:hover {
    background-color: #c0392b; /* Darker red from logo */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.hint-button:hover::before {
    transform: translateX(0);
}

.guess-container {
    text-align: center;
    padding: 1rem;
}

.guess-container p {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.candidate-button {
    padding: 0.75rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--button-radius);
    font-size: 1.1rem;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.candidate-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.candidate-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.candidate-button:hover::before {
    transform: translateX(0);
}

.trump {
    background-color: var(--trump-color);
    color: var(--light-text);
}

.harris {
    background-color: var(--harris-color);
    color: var(--light-text);
}

#result-container {
    text-align: center;
    padding: 1.5rem;
    background-color: rgba(10, 37, 51, 0.6); /* Semi-transparent dark blue/teal from logo */
    border-radius: 8px;
    border: 1px solid var(--background-light); /* Cream/beige border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: result-appear 0.5s ease-out;
}

@keyframes result-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#result-text {
    font-size: 1.3rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#county-info {
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.next-button {
    background-color: var(--accent-color);
    color: var(--light-text);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 2rem;
    border-radius: var(--button-radius);
    font-size: 1.1rem;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.3s, background-color 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.next-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.next-button:hover {
    background-color: #c0392b; /* Darker red from logo */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.next-button:hover::before {
    transform: translateX(0);
}

.api-key-message {
    background-color: rgba(231, 76, 60, 0.7); /* Semi-transparent red from logo */
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 0 auto;
    max-width: 800px;
    text-align: center;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    font-family: 'Playfair Display', serif;
}

.hidden {
    display: none;
}

footer {
    background-color: rgba(10, 37, 51, 0.7); /* Semi-transparent dark blue/teal from logo */
    text-align: center;
    padding: 8px; /* Slightly increased padding */
    position: fixed; /* Change from absolute to fixed */
    bottom: 0;
    width: 100%;
    z-index: 5; /* Lower than game info */
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 0.9rem;
}

/* Hyperlink styling */
a {
    color: var(--background-light); /* Cream/beige color from logo */
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    color: var(--accent-color); /* Red from logo */
    text-decoration: underline;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .game-info {
        max-width: 800px;
    }
}

@media (max-width: 767px) {
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 0.5rem;
    }
    
    .logo-image {
        height: 60px;
    }
    
    .game-info {
        max-width: 80%; /* Percentage-based width for small screens */
        bottom: 40px; /* Slightly less space on mobile */
        left: 50%; /* Center horizontally */
        transform: translateX(-50%); /* Center properly */
    }
    
    .buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .candidate-button {
        width: 80%;
    }
}
