/**
 * App Quickstart Styles
 * Extracted for browser caching and minification
 */

/* Outer container - holds blurred background on desktop */
.app-quickstart-outer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* Card frame - contains the map on desktop */
.app-quickstart-card-frame {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

/* Override fixed positioning for app-quickstart - ALWAYS use absolute */
.app-quickstart-outer .app-quickstart-card-frame .app-quickstart-map {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Desktop: blurred background and card styling */
@media (min-width: 768px) {
    .app-quickstart-outer::before {
        content: '';
        position: absolute;
        top: -20px;
        left: -20px;
        right: -20px;
        bottom: -20px;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
        filter: blur(30px) brightness(0.4);
        z-index: 0;
    }
    
    .app-quickstart-card-frame {
        max-width: 500px;
        max-height: 90vh;
        border-radius: 24px;
        border: 3px solid rgba(236, 72, 153, 0.5);
    }
    
    /* Override the fixed positioning from quest-map.css */
    .app-quickstart-card-frame .quest-map-container {
        position: absolute !important;
        border-radius: 21px;
        overflow: hidden;
    }
    
    .app-quickstart-card-frame .quest-map {
        border-radius: 21px;
    }
    
    .app-quickstart-quiz-cards {
        width: 400px;
        height: 350px;
    }
    
}

/* Fade-in Title Overlay */
.app-quickstart-title-overlay {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    animation: fadeInTitle 0.5s ease-out forwards;
    pointer-events: none;
    width: calc(100% - 60px);
    max-width: 500px;
    padding: 0 30px;
    box-sizing: border-box;
}

.app-quickstart-main-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #f472b6;
    margin: 0;
    line-height: 1.2;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000,
                 0 -2px 0 #000, 0 2px 0 #000, -2px 0 0 #000, 2px 0 0 #000,
                 0 4px 20px rgba(0, 0, 0, 0.8);
}

.app-quickstart-subtitle {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0.15rem 0 0 0;
    line-height: 1.05;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000,
                 0 -2px 0 #000, 0 2px 0 #000, -2px 0 0 #000, 2px 0 0 #000;
}

@keyframes fadeInTitle {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Footer Text Overlay */
.app-quickstart-footer-overlay {
    position: absolute;
    bottom: 160px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    width: calc(100% - 60px);
    max-width: 500px;
    padding: 0 30px;
    box-sizing: border-box;
}

.app-quickstart-footer-overlay.visible {
    opacity: 1;
}

.app-quickstart-footer-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.05;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000,
                 0 -2px 0 #000, 0 2px 0 #000, -2px 0 0 #000, 2px 0 0 #000;
}

/* Mobile: remove extra padding */
@media (max-width: 767px) {
    .app-quickstart-title-overlay {
        width: 90%;
        padding: 0;
    }
    
    .app-quickstart-footer-overlay {
        width: 90%;
        padding: 0;
    }
    
    .app-quickstart-quiz-cards {
        margin-top: -50px;
    }
}

/* Top and Bottom Feathering */
.app-quickstart-feather-top,
.app-quickstart-feather-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 120px;
    pointer-events: none;
    z-index: 5;
}

.app-quickstart-feather-top {
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
}

.app-quickstart-feather-bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Top row: down 30px, inwards 10px */
.app-quickstart-map .quest-map-header {
    top: 30px !important;
    left: 10px !important;
    right: 10px !important;
}
/* App Quick Start header: no background, aura value top right */
.app-quickstart-header {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
}
.app-quickstart-header .quest-info-name,
.app-quickstart-header .quest-info-description,
.app-quickstart-aura {
    color: #ffd700 !important;
    /* 2px black outline (works in all browsers) */
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000,
                 0 -2px 0 #000, 0 2px 0 #000, -2px 0 0 #000, 2px 0 0 #000;
}
.app-quickstart-klout-icon {
    color: #e91e8c;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,
                 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000, 1px 0 0 #000;
}
.app-quickstart-header .quest-info-name {
    font-size: 18px;
}
.app-quickstart-aura-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.app-quickstart-aura {
    font-family: 'Fredoka', sans-serif;
    font-size: 18px;
    font-weight: 600;
}
.app-quickstart-aura-icon {
    color: #e91e8c;
    font-size: 20px;
    flex-shrink: 0;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,
                 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000, 1px 0 0 #000;
}
.app-quickstart-len-marker {
    width: 81px;
    height: 81px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 10;
    margin-top: 10px;
}

/* Bottom Feature Row */
.app-quickstart-bottom-row {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 50px;
    padding: 0 20px;
    z-index: 10;
    overflow: visible;
}

.app-quickstart-feature {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
}

.app-quickstart-feature img {
    width: 81px;
    height: 81px;
    border-radius: 50%;
    outline: 1px solid #fff;
    object-fit: cover;
    flex-shrink: 0;
    transition: filter 0.5s ease;
}

/* Highlighted feature (full color + pulsate) */
.app-quickstart-feature.highlighted img {
    filter: none !important;
    animation: featurePulse 1.5s ease-in-out infinite;
}

.app-quickstart-feature.highlighted .app-quickstart-feature-text {
    filter: none !important;
}

@keyframes featurePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px 10px rgba(34, 197, 94, 0.4);
    }
}

.app-quickstart-feature-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    margin-top: -10px;
}

.app-quickstart-feature-text .feature-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffd545;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,
                 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000, 1px 0 0 #000;
    line-height: 1;
}

.app-quickstart-feature-text .feature-value {
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #f5e5af;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,
                 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000, 1px 0 0 #000;
    line-height: 1;
}

/* Green circle marker - wrapper for proper centering */
.app-quickstart-green-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.app-quickstart-green-circle::after {
    content: '';
    width: 24px;
    height: 24px;
    background-color: rgba(34, 197, 94, 0.5);
    border: 2px solid rgba(22, 163, 74, 0.7);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: rotateX(60deg);
    transition: width 1s ease, height 1s ease, filter 0.5s ease;
}

.app-quickstart-green-circle.expanded::after {
    width: 144px;
    height: 144px;
}

.app-quickstart-green-circle.expanded-large::after {
    width: 360px;
    height: 360px;
}

.app-quickstart-green-circle.expanded-xlarge::after {
    width: 198px;
    height: 198px;
}

.app-quickstart-green-circle.greyscale::after {
    filter: grayscale(100%);
}

/* Greyscale state for UI elements */
.app-quickstart-map.greyscale-mode .app-quickstart-feather-top,
.app-quickstart-map.greyscale-mode .app-quickstart-feather-bottom {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

/* Apply greyscale to header elements individually for separate control */
.app-quickstart-map.greyscale-mode .quest-info-name-row,
.app-quickstart-map.greyscale-mode .app-quickstart-aura-row {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.app-quickstart-map.greyscale-mode .quest-info-name-row.highlighted {
    filter: none;
}

.app-quickstart-map.greyscale-mode .app-quickstart-aura-row.highlighted {
    filter: none;
}

.app-quickstart-aura-row.highlighted .app-quickstart-aura,
.app-quickstart-aura-row.highlighted .app-quickstart-aura-icon {
    animation: kloutPulse 1.5s ease-in-out infinite;
}

/* Apply greyscale to individual features so we can exclude highlighted ones */
.app-quickstart-map.greyscale-mode .app-quickstart-feature {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.app-quickstart-map.greyscale-mode .app-quickstart-feature.highlighted {
    filter: none;
}

/* Map greyscale control - applied to canvas only, not markers */
.quest-map {
    background: #000;
}

.quest-map canvas {
    transition: filter 0.5s ease, opacity 0.5s ease;
}

.quest-map.greyscale canvas {
    filter: grayscale(100%);
    opacity: 0.5;
}

/* Len-marker greyscale control */
.app-quickstart-len-marker {
    transition: filter 0.5s ease;
}

.app-quickstart-len-marker.greyscale {
    filter: grayscale(100%);
}

/* SVG Hexagon Overlay */
.hexagon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    transition: filter 0.5s ease;
}

.hexagon-overlay.greyscale {
    filter: grayscale(100%);
}

.hexagon-overlay .hex-fill {
    stroke: #000;
    stroke-width: 2;
}

.hexagon-overlay .hex-fill.center {
    fill: rgba(243, 156, 18, 0.25);
}

/* Klout row animation to center */
.quest-info-name-row {
    transition: filter 0.5s ease;
}

.quest-info-name-row.highlighted {
    filter: none !important;
}

.quest-info-name-row.highlighted .app-quickstart-klout-icon,
.quest-info-name-row.highlighted .quest-info-name {
    animation: kloutPulse 1.5s ease-in-out infinite;
}

@keyframes kloutPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* Centered Large Klout Display */
.app-quickstart-klout-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.app-quickstart-klout-center.visible {
    opacity: 1;
}

.app-quickstart-klout-center i {
    font-size: 120px;
    color: #e91e8c;
    text-shadow: -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000,
                 0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}

.app-quickstart-klout-center span {
    font-family: 'Fredoka', sans-serif;
    font-size: 80px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000,
                 0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
    margin-top: -10px;
}

/* Centered Large Aura Display */
.app-quickstart-aura-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.app-quickstart-aura-center.visible {
    opacity: 1;
}

.app-quickstart-aura-center i {
    font-size: 120px;
    color: #e91e8c;
    text-shadow: -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000,
                 0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}

.app-quickstart-aura-center span {
    font-family: 'Fredoka', sans-serif;
    font-size: 80px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000,
                 0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
    margin-top: -10px;
}

/* Quiz Cards Scattered Display */
.app-quickstart-quiz-cards {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    width: 280px;
    height: 250px;
}

.app-quickstart-quiz-cards.visible {
    opacity: 1;
}

.app-quickstart-quiz-cards .quiz-card {
    position: absolute;
    width: 100px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: none;
}

.app-quickstart-quiz-cards.visible .quiz-card {
    animation: cardScatterIn 0.5s ease-out forwards;
    animation-delay: calc(var(--card-index) * 0.12s);
}

/* Random scattered positions for 5 cards */
.app-quickstart-quiz-cards .quiz-card:nth-child(1) {
    --final-x: 10px;
    --final-y: 20px;
    --final-rotation: -12deg;
}
.app-quickstart-quiz-cards .quiz-card:nth-child(2) {
    --final-x: 160px;
    --final-y: 5px;
    --final-rotation: 8deg;
}
.app-quickstart-quiz-cards .quiz-card:nth-child(3) {
    --final-x: 85px;
    --final-y: 60px;
    --final-rotation: -3deg;
}
.app-quickstart-quiz-cards .quiz-card:nth-child(4) {
    --final-x: 30px;
    --final-y: 120px;
    --final-rotation: 15deg;
}
.app-quickstart-quiz-cards .quiz-card:nth-child(5) {
    --final-x: 150px;
    --final-y: 100px;
    --final-rotation: -8deg;
}

@keyframes cardScatterIn {
    0% {
        opacity: 0;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(0deg) scale(0.3);
    }
    100% {
        opacity: 1;
        left: var(--final-x);
        top: var(--final-y);
        transform: rotate(var(--final-rotation)) scale(1);
    }
}

/* Download App Overlay */
.app-quickstart-download-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 60;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.app-quickstart-download-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.download-overlay-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px 50px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.download-overlay-content .download-logo {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
}

.download-overlay-content h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

.download-overlay-content p {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f472b6;
    margin: 0 0 25px 0;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.download-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.download-btn.ios {
    background: #000;
    color: #fff;
}

.download-btn.android {
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    color: #fff;
}

.download-btn i {
    font-size: 1.2rem;
}

/* Desktop: larger quiz cards */
@media (min-width: 768px) {
    .app-quickstart-quiz-cards {
        width: 400px;
        height: 350px;
        margin-top: -70px;
    }
    
    .app-quickstart-quiz-cards .quiz-card {
        width: 150px;
    }
    
    .app-quickstart-quiz-cards .quiz-card:nth-child(1) {
        --final-x: 20px;
        --final-y: 30px;
    }
    .app-quickstart-quiz-cards .quiz-card:nth-child(2) {
        --final-x: 230px;
        --final-y: 10px;
    }
    .app-quickstart-quiz-cards .quiz-card:nth-child(3) {
        --final-x: 125px;
        --final-y: 80px;
    }
    .app-quickstart-quiz-cards .quiz-card:nth-child(4) {
        --final-x: 40px;
        --final-y: 160px;
    }
    .app-quickstart-quiz-cards .quiz-card:nth-child(5) {
        --final-x: 210px;
        --final-y: 140px;
    }
}

.hexagon-overlay .hex-fill.outer {
    fill: rgba(233, 30, 140, 0.25);
}
