* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 600px;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 28px;
}

h2 {
    color: #555;
    margin-bottom: 20px;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-top: 20px;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #666;
    font-size: 16px;
}

/* Results */
.results {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#resultContent {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

#resultContent p {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.6;
}

#resultContent strong {
    color: #333;
}

/* Error */
.error {
    text-align: center;
    padding: 20px;
}

.error p {
    color: #dc3545;
    font-size: 16px;
    margin-bottom: 20px;
}

/* Hidden class */
.hidden {
    display: none !important;
}

#resultId {
    color: #667eea;
}

/* Wide container for results */
.container-wide {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.card-result {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    min-height: 100vh;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.result-header h1 {
    margin: 0;
    font-size: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-home {
    padding: 10px 20px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.result-badge {
    background: white;
    padding: 15px 25px;
    border-radius: 50px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: inline-block;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.section-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.section-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-card h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* ============================================ */
/* WRAPPED FULLSCREEN STYLES */
/* ============================================ */

.wrapped-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

.cards-wrapper {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.cards-wrapper::-webkit-scrollbar {
    display: none;
}

.wrapped-card {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    position: relative;
    overflow: visible;
}

.wrapped-card-content {
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 10;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Indicator */
.progress-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.progress-dots {
    display: flex;
    gap: 8px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.progress-dot.active {
    background: white;
    transform: scale(1.3);
}

.card-counter {
    color: white;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.8;
}

/* Navigation Hint */
.nav-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    color: white;
    text-align: center;
    opacity: 0.8;
    animation: bounce 2s infinite;
    display: none;
}

.mobile-scroll-hint {
    display: none;
    animation: pulse 2s infinite;
}

.desktop-scroll-hint {
    display: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-5px);
    }
}

.swipe-arrow {
    font-size: 32px;
    margin-bottom: 5px;
}

.nav-hint p {
    font-size: 14px;
    margin: 0;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Next Button (Desktop only) */
.next-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
    background: white;
    color: #333;
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    display: none;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.next-btn:active {
    transform: translateY(0);
}

.next-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Previous Button (Desktop only) */
.prev-btn {
    position: fixed;
    bottom: 40px;
    left: 40px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    display: none;
}

.prev-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    background: white;
}

.prev-btn:active {
    transform: translateY(0);
}

.prev-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Exit Button */
.exit-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    z-index: 1001;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.exit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* New Search Button */
.new-search-floating {
    position: fixed;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    animation: bounceIn 0.6s ease-out;
}

.new-search-floating.hidden {
    display: none;
}

.btn-new-search {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 38px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(12px);
    color: #667eea;
    border-radius: 50px;
    text-decoration: none;
    font-size: 19px;
    font-weight: 800;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.35), 0 0 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.btn-new-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.btn-new-search:hover::before {
    left: 100%;
}

.btn-new-search:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.98) 100%);
    border-color: rgba(255, 255, 255, 0.8);
}

.btn-new-search:active {
    transform: translateY(-2px) scale(1.01);
}

.btn-new-search .icon {
    font-size: 26px;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.btn-new-search .text {
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    60% {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px);
    }
    100% {
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes numberPop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    70% {
        transform: scale(1.1) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes expandWidth {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 80px;
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes coinFlip {
    0% {
        transform: rotateY(0deg) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: rotateY(180deg) scale(1.1);
    }
    100% {
        transform: rotateY(360deg) scale(1);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rotateIn {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes medalBounce {
    0% {
        opacity: 0;
        transform: scale(0) translateY(-50px);
    }
    50% {
        transform: scale(1.3) translateY(0);
    }
    70% {
        transform: scale(0.9) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes trainSlide {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    60% {
        transform: translateX(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes clockSpin {
    0% {
        opacity: 0;
        transform: rotate(0deg) scale(0.3);
    }
    70% {
        transform: rotate(380deg) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: rotate(360deg) scale(1);
    }
}

@keyframes iconBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(30px);
    }
    50% {
        transform: scale(1.15) translateY(-10px);
    }
    70% {
        transform: scale(0.95) translateY(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes batteryCharge {
    0% {
        opacity: 0;
        transform: scale(0.5);
        filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)) brightness(0.5);
    }
    30% {
        filter: drop-shadow(0 4px 12px rgba(67,233,123,0.8)) brightness(1.5);
    }
    60% {
        transform: scale(1.2);
        filter: drop-shadow(0 4px 20px rgba(67,233,123,1)) brightness(1.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)) brightness(1);
    }
}

@keyframes fireFlicker {
    0%, 100% {
        transform: scale(1) rotate(-2deg);
        filter: drop-shadow(0 4px 15px rgba(192,57,43,0.4)) brightness(1);
    }
    25% {
        transform: scale(1.05) rotate(2deg);
        filter: drop-shadow(0 4px 20px rgba(255,107,107,0.6)) brightness(1.2);
    }
    50% {
        transform: scale(0.95) rotate(-1deg);
        filter: drop-shadow(0 4px 18px rgba(255,69,0,0.5)) brightness(0.9);
    }
    75% {
        transform: scale(1.03) rotate(1deg);
        filter: drop-shadow(0 4px 22px rgba(231,76,60,0.7)) brightness(1.1);
    }
}

@keyframes numberPulse {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes sunRise {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.5);
        filter: drop-shadow(0 3px 10px rgba(255,152,0,0)) brightness(0.5);
    }
    50% {
        filter: drop-shadow(0 3px 15px rgba(255,152,0,0.6)) brightness(1.3);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 3px 10px rgba(255,152,0,0.4)) brightness(1);
    }
}

@keyframes moonGlow {
    0%, 100% {
        filter: drop-shadow(0 3px 10px rgba(138,43,226,0.5)) brightness(1);
    }
    50% {
        filter: drop-shadow(0 3px 20px rgba(138,43,226,0.8)) brightness(1.2);
    }
}

@keyframes calendarFlip {
    0% {
        opacity: 0;
        transform: rotateY(0deg) scale(0.5);
    }
    50% {
        transform: rotateY(180deg) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: rotateY(360deg) scale(1);
    }
}

@keyframes progressRing {
    0% {
        stroke-dasharray: 0 628;
    }
    100% {
        stroke-dasharray: var(--dash) 628;
    }
}

/* Loading Fullscreen */
.loading-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 2000;
}

.loading-fullscreen p {
    margin-top: 20px;
    font-size: 18px;
}

/* Error Fullscreen */
.error-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    z-index: 2000;
}

.error-content {
    text-align: center;
    color: white;
    padding: 40px;
    max-width: 500px;
}

.error-content h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: white;
}

.error-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .wrapped-card {
        padding: 15px;
    }
    
    .wrapped-card-content {
        max-width: 100%;
    }
    
    .exit-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }
    
    .progress-indicator {
        top: 15px;
    }
    
    .next-btn {
        display: none !important;
    }
    
    .prev-btn {
        display: none !important;
    }
    
    .mobile-scroll-hint {
        display: block;
    }
    
    .desktop-scroll-hint {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .next-btn {
        display: block;
    }
    
    .prev-btn {
        display: block;
    }
    
    .nav-hint {
        display: none;
    }
    
    .mobile-scroll-hint {
        display: none !important;
    }
    
    .desktop-scroll-hint {
        display: block;
    }
}

@media (max-width: 480px) {
    .wrapped-card {
        padding: 10px;
    }
    
    .nav-hint {
        bottom: 20px;
    }
}

