/*
   Berlin Quest Walking Tour
   Mobile-first responsive design
   PLAY! Berlin color palette
*/

/* Custom Fonts - PLAY! Berlin */
/* Sans font for body text (the heavier one) */
@font-face {
    font-family: 'PlaySans';
    src: url('25297606104d9e77-s.p.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Acident font for headers/display (the lighter one) */
@font-face {
    font-family: 'PlayAcident';
    src: url('a98c6d442728d7c9-s.p.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Additional fonts for multilingual support */
@font-face {
    font-family: 'CoFoSona';
    src: url('fonts/CoFoSona-Regular.woff2') format('woff2'),
         url('fonts/CoFoSona-Regular.woff') format('woff'),
         url('fonts/CoFoSona-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Zloy';
    src: url('fonts/Zloy-Regular-Web.woff2') format('woff2'),
         url('fonts/Zloy-Regular-Web.woff') format('woff'),
         url('fonts/Zloy-Regular-Web.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables - PLAY! Berlin Colors */
:root {
    --cream: #F6F1E0;
    --sand: #E0B86A;
    --blue: #3874EC;
    --dark-brown: #30260F;
    --sky-blue: #C1E1FC;

    /* Semantic color assignments */
    --background-color: #F6F1E0;
    --text-color: #30260F;
    --primary-color: #3874EC;
    --secondary-color: #C1E1FC;
    --accent-color: #E0B86A;
    --border-color: #C1E1FC;
    --hover-color: #2960D1;
    --link-background: #C1E1FC;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'PlaySans', 'CoFoSona', 'Zloy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 20px;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header and Typography */
.main-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.header-logo {
    width: 80px;
    height: auto;
    flex-shrink: 0;
}

.main-title {
    font-family: 'PlayAcident', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
    line-height: 1.2;
    margin: 0;
    letter-spacing: 0.5px;
    flex: 1;
}

h1, h2, h3 {
    font-family: 'PlayAcident', sans-serif;
}

h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

/* Description Section */
.description {
    margin-bottom: 35px;
    font-size: 1rem;
    line-height: 1.7;
}

.description p {
    margin-bottom: 12px;
}

.description strong {
    color: var(--primary-color);
}


/* Quest Links Grid */
.quest-links {
    margin-top: 40px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.quest-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-height: 100px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.quest-link:hover,
.quest-link:focus {
    background-color: var(--hover-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.quest-link:active {
    transform: translateY(-1px);
}

/* Stop Pages */
.stop-page {
    padding-top: 20px;
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    margin-bottom: 30px;
    padding: 8px 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.back-link:hover,
.back-link:focus {
    background-color: var(--link-background);
}

.stop-content {
    text-align: center;
}

.stop-instruction {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--link-background);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.stop-instruction p {
    margin-bottom: 12px;
    padding-left: 5px;
}

.stop-instruction p:last-child {
    margin-bottom: 0;
}

/* Video Container (for YouTube embeds) */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: var(--sky-blue);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(48, 38, 15, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
}

/* Audio Player */
.audio-player {
    background-color: var(--sky-blue);
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 8px 20px rgba(48, 38, 15, 0.1);
    margin: 30px auto;
    max-width: 500px;
}

.player-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* Play Button */
.play-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(56, 116, 236, 0.3);
    -webkit-tap-highlight-color: transparent;
}

.play-button:hover,
.play-button:focus {
    background-color: var(--hover-color);
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(56, 116, 236, 0.4);
}

.play-button:active {
    transform: scale(0.98);
}

.play-button svg {
    width: 32px;
    height: 32px;
}

/* Progress Container */
.progress-container {
    width: 100%;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 500;
}

/* Progress Bar */
.progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: width 0.1s linear;
    pointer-events: none;
}

.progress-slider {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 20px;
    opacity: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.progress-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

/* Volume Button */
.volume-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--link-background);
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.volume-button:hover,
.volume-button:focus {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.volume-button:active {
    transform: scale(0.95);
}

.volume-button svg {
    width: 24px;
    height: 24px;
}

/* Player Buttons */
.player-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Skip Buttons */
.skip-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--link-background);
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.skip-button:hover,
.skip-button:focus {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.skip-button:active {
    transform: scale(0.95);
}

.skip-button svg {
    width: 20px;
    height: 20px;
}

.skip-time {
    position: absolute;
    bottom: -18px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Volume Controls */
.volume-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 250px;
}

/* Volume Slider */
.volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 10px;
    background: var(--border-color);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Tablet Styles */
@media (min-width: 600px) {
    .header-logo {
        width: 100px;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .links-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }

    .quest-link {
        font-size: 2.5rem;
    }

    .stop-title {
        font-size: 2.2rem;
    }
}

/* Desktop Styles */
@media (min-width: 900px) {
    body {
        padding: 40px;
    }

    .header-logo {
        width: 120px;
    }

    .main-title {
        font-size: 3rem;
    }

    .description {
        font-size: 1.1rem;
    }

    .links-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 25px;
    }

    .stop-title {
        font-size: 2.5rem;
        margin-bottom: 50px;
    }

    .audio-player {
        padding: 40px 30px;
    }
}

/* Footer */
.site-footer {
    margin-top: 60px;
    padding: 30px 0;
    text-align: center;
    border-top: 2px solid var(--border-color);
}

.footer-logo {
    max-width: 200px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

/* Accessibility */
button:focus,
a:focus,
input:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Ensure consistent colors across light/dark mode preferences */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #F6F1E0;
        --text-color: #30260F;
    }

    .audio-player {
        background-color: var(--sky-blue);
    }
}

/* Print Styles */
@media print {
    .audio-player {
        display: none;
    }
}
