:root {
    --primary: #2d3436;
    --secondary: #0984e3;
    --accent: #d63031;
    --light: #f5f5f5;
    --light-gray: #dfe6e9;
    --dark: #2d3436;
    --success: #d63031;
    --danger: #00b894;
    --neutral: #636e72;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

header {
    background-color: var(--primary);
    color: white;
    text-align: center;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,184,148,0.3) 0%, rgba(214,48,49,0.3) 100%);
    z-index: 1;
}

header > * {
    position: relative;
    z-index: 2;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.3rem;
    font-style: italic;
    opacity: 0.9;
}

.accent {
    position: relative;
    display: inline-block;
    font-weight: 700;
}

h1 span.accent:first-of-type {
    color: var(--success);
}

h1 span.accent:last-of-type {
    color: var(--danger);
}

main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    margin-bottom: 3.5rem;
}

h2 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary);
    border-radius: 2px;
}

#timeline-container, #map-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 2rem;
    transition: all 0.3s ease;
}

#timeline-container:hover, #map-container:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

#timeline {
    width: 100%;
    height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) var(--light-gray);
}

#timeline::-webkit-scrollbar {
    width: 8px;
}

#timeline::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}

#timeline::-webkit-scrollbar-thumb {
    background-color: var(--secondary);
    border-radius: 4px;
}

#map {
    width: 100%;
    height: 500px;
    position: relative;
}

.world-map {
    background-color: #f0f8ff; /* Light blue background for oceans */
}

.date-picker-container {
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

#date-picker {
    padding: 0.5rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 6px;
    background-color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

#date-picker:hover, #date-picker:focus {
    border-color: var(--secondary);
    outline: none;
}

footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--dark);
    color: white;
    margin-top: 3rem;
    font-size: 0.9rem;
}

/* Timeline specific styles */
.timeline-header {
    margin-bottom: 1rem;
    padding: 0.5rem;
    text-align: center;
    color: var(--secondary);
    font-weight: 500;
    border-bottom: 1px solid var(--light-gray);
}

.timeline-entry {
    padding: 1.2rem;
    margin: 0.8rem 0;
    border-left: 4px solid var(--secondary);
    background-color: var(--light);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    position: relative;
}

.timeline-entry:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.timeline-entry.on {
    border-left-color: var(--success);
}

.timeline-entry.off {
    border-left-color: var(--danger);
}

.timeline-entry.neutral {
    border-left-color: var(--light-gray);
}

.timeline-date {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.3rem;
}

.timeline-country {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.timeline-status {
    margin-bottom: 0.5rem;
}

.timeline-status strong {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: white;
}

.timeline-entry.on .timeline-status strong {
    background-color: var(--success);
}

.timeline-entry.off .timeline-status strong {
    background-color: var(--danger);
}

.timeline-entry.neutral .timeline-status strong {
    background-color: var(--neutral);
}

.timeline-description {
    color: var(--dark);
    line-height: 1.4;
}

/* Map specific styles */
.country {
    stroke: #fff;
    stroke-width: 0.5px;
    transition: opacity 0.2s ease;
}

.country:hover {
    opacity: 0.8;
    cursor: pointer;
}

.country.on {
    fill: var(--success);
}

.country.off {
    fill: var(--danger);
}

.country.neutral {
    fill: var(--neutral);
}

/* European Union styling */
.country.eu-member {
    stroke: #0066ff;
    stroke-width: 1.5px;
    stroke-dasharray: 3,2;
}

.eu-marker {
    opacity: 0.9;
    transition: all 0.2s ease;
}

.eu-marker:hover {
    opacity: 1;
}

/* Status counter */
.status-counter {
    margin: 0.5rem 0 1rem;
}

.counter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.counter {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

.counter.on {
    background-color: var(--success);
}

.counter.off {
    background-color: var(--danger);
}

/* Loading indicator */
.loading-indicator {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: var(--secondary);
    font-style: italic;
}

/* Map tooltip */
.map-tooltip {
    transition: all 0.2s ease;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive design */
@media (min-width: 768px) {
    main {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Quote section styles */
#quote-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 2rem;
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 2rem;
}

#quote-container:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

#random-quote {
    padding: 1.5rem;
    position: relative;
}

.quote-text {
    font-size: 1.4rem;
    line-height: 1.4;
    font-style: italic;
    color: var(--dark);
    margin-bottom: 1rem;
    position: relative;
}

.quote-text::before,
.quote-text::after {
    content: '"';
    font-size: 2rem;
    color: var(--accent);
    font-family: serif;
}

.quote-source {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.quote-source a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.quote-source a:hover {
    color: var(--accent);
    text-decoration: underline;
}

#new-quote-btn {
    background-color: var(--secondary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#new-quote-btn:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#new-quote-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (min-width: 992px) {
    main {
        grid-template-columns: 1fr 1fr;
    }
    
    #quote-container {
        grid-column: 1 / span 2;
    }
    
    #timeline-container, #map-container {
        height: 100%;
    }
    
    #timeline-container {
        grid-column: 1;
    }
    
    #map-container {
        grid-column: 2;
    }
    
    section {
        margin-bottom: 0;
    }

    #quote-container {
        margin-bottom: 2rem;
    }
}