@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

.directions-page,
.directions-page * {
    box-sizing: border-box;
}

.directions-page {
    --bg-color: #0b0c10;
    --primary: #9b59b6;
    --secondary: #3498db;
    --accent: #f1c40f;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --glass-bg: rgba(30, 31, 40, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --correct-color: #2ecc71;
    --incorrect-color: #e74c3c;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: calc(100vh - var(--header-height, 64px));
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.25rem 3rem;
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

.directions-page a.map-link-btn {
    text-decoration: none;
}

.directions-page a.map-link-btn:hover {
    text-decoration: underline;
}

.directions-page .hidden {
    display: none !important;
}

/* Dynamic Animated Background */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 10%;
    left: 20%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: 10%;
    right: 10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: #e74c3c;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

.directions-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
}

.directions-page header {
    text-align: center;
}

.directions-page .directions-address-toggle {
    margin-top: 10px;
}

.directions-page .directions-address-revealed {
    margin-top: 10px;
    color: var(--text-muted);
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--glass-border);
}

.mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 0;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    color: #fff;
}

.mode-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
}

/* Card Container */
.card-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.mode-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.mode-content.active {
    display: block;
}

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

/* Steps (Easy Mode) */
.step {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--accent);
    flex-shrink: 0;
}

.step-details h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: #fff;
}

.step-details p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 0.95rem;
}

.step-details strong {
    color: var(--text-main);
}

/* Quest Mode Specifics */
.quest-screen {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s ease forwards;
}

.quest-screen.active {
    display: block;
}

.quest-intro {
    color: var(--accent);
    font-style: italic;
    margin: 20px 0;
    font-size: 1.1rem;
}

.icon-large {
    font-size: 4rem;
    margin: 10px 0;
}

.pulse {
    animation: pulse 2s infinite alternate;
}

.glow {
    filter: drop-shadow(0 0 15px var(--primary));
}

.glow-gold {
    filter: drop-shadow(0 0 15px var(--accent));
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.action-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.6);
}

.quest-header {
    margin-bottom: 20px;
}

.quest-progress {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.mana-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.mana-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transition: width 0.5s ease-out;
}

.quest-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.riddle {
    font-style: italic;
    color: #dcdde1;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Choices */
.choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.choice-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.choice-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateX(5px);
}

.choice-btn.correct {
    background: rgba(46, 204, 113, 0.2);
    border-color: var(--correct-color);
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.4);
}

.choice-btn.incorrect {
    background: rgba(231, 76, 60, 0.2);
    border-color: var(--incorrect-color);
    animation: shake 0.5s;
}

.choice-btn.eliminated {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    border-color: var(--glass-border);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

.hint-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.hint-btn:hover {
    background: rgba(241, 196, 15, 0.1);
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.hint-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hint {
    background: rgba(52, 152, 219, 0.1);
    border-left: 3px solid var(--secondary);
    padding: 10px 14px;
    border-radius: 0 4px 4px 0;
    color: #fff;
    font-size: 0.95rem;
    display: none;
    text-align: left;
}

.hint.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.victory-title {
    color: var(--accent);
    font-size: 2rem !important;
    margin-bottom: 10px !important;
}

.final-address {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-top: 15px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px dashed var(--accent);
}

/* Map Mode Specifics */
.map-container {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--glass-border);
}

.address-box {
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 12px;
}

.address-box p {
    margin-bottom: 4px;
}

.map-link-btn {
    display: inline-block;
    margin-top: 12px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.map-link-btn:hover {
    color: #fff;
}

/* Share Button */
.share-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.5);
}

.share-btn:active {
    transform: translateY(0);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
