/* Left goddess image wrapper */
.image-left-wrapper {
    flex: 0 1 20vw;
    min-width: 180px;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-left-wrapper .slideUp {
    width: 100%;
    max-width: 20vw;
    min-width: 180px;
    height: auto;
    margin-right: 0;
    box-shadow: none;
}

/* Flex row for camera preview and goddess image */
.preview-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2vw;
    width: 100vw;
    margin-top: 2vh;
    margin-bottom: 2vh;
    padding: 0 2vw;
}

.preview-row .preview-section {
    flex: 3 1 50vw;
    min-width: 300px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-row .image-right-wrapper {
    flex: 0 1 20vw;
    min-width: 180px;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-row .slideUp {
    width: 100%;
    max-width: 20vw;
    min-width: 180px;
    height: auto;
    margin-left: 0;
    box-shadow: none;
}

@media (max-width: 900px) {
    .preview-row {
        flex-direction: column;
        gap: 3vh;
    }
    .preview-row .image-right-wrapper {
        margin-top: 1vh;
        margin-left: 0;
    }
    .image-left-wrapper .slideUp,
    .preview-row .slideUp {
        max-width: 25vw;
        min-width: 120px;
    }
}

.app-title, .app-subtitle, .main-container, .preview-section, .controls-section, .btn, .btn-secondary {
    color: white;
}

/* Title row: icons on both sides of the main title */
.title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.title-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    opacity: 0.95;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}
.title-icon.left { transform: translateX(-4px); }
.title-icon.right { transform: translateX(4px); }

/* Decorative title box to highlight the main heading */
.title-box {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: 18px;
    background: linear-gradient(90deg, #B6862C 0%, #E6C36F 50%, #B6862C 100%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    margin-bottom: 0.6rem;
         background: linear-gradient(90deg, #B6862C 0%, #E6C36F 50%, #B6862C 100%);
}

/* Greek-inspired font stack; you can add a webfont later (GFS Didot, Cardo, Cormorant) */
.app-title {
    font-family: 'Cormorant Garamond', 'GFS Didot', Georgia, 'Times New Roman', serif;
    color: white
}

@media (max-width: 480px) {
    .title-icon { width: 36px; height: 36px; }
    .app-title { font-size: 1.6rem; }
}
.vines-bottom {
    position: absolute;
    top: -25%;
    left: -5%;
    width: 110%;
    height: auto;
    max-height: 40%;
    pointer-events: none;
    z-index: 3;
    object-fit: cover;
}

.vines-top {
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 110%;
    height: auto;
    max-height: 40%;
    pointer-events: none;
    z-index: 3;
    object-fit: cover;
    transform: scaleY(-1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Papyrus", cursive;
    background: linear-gradient(180deg, #76846d 0%, #9fab94 25%, #c0cfb2 50%, #9fab94 75%, #76846d 100%);
    min-height: 100vh;
    color: #49705B;
    width: 100vw;
    overflow-x: hidden;
}

.app-subtitle {
    font-family: Verdana, Geneva, Tahoma, sans-serif, -apple-system, BlinkMacSystemFont, cursive;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,0.95);
    margin-top: 0.6vh;
    text-align: center;
    animation: fadeIn 1s ease-out forwards;
    background: rgba(255,255,255,0.08);
    padding: 6px 14px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    backdrop-filter: blur(4px) saturate(120%);
}

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

.app {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2vh 2vw;
    animation: fadeIn 1s ease-out forwards;
}

.main-container {
    width: 100%;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2vh;
}

.app-title {
    font-size: clamp(2.4rem, 6.8vw, 4rem);
    font-weight: 900;
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    background-clip: border-box;
    text-align: center;
    margin-top: 1.2vh;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: white;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: white;
    filter: drop-shadow(0 8px 18px rgba(20,60,30,0.12));
    position: relative;
}



.preview-section {
    position: relative;
    width: 100%;
    background-color: white;
    border-radius: clamp(15px, 2vw, 20px);
    padding: clamp(0.8rem, 2vw, 1rem);
    box-shadow: 0 1vh 4vh rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    max-width: 50vw;
    min-width: 300px;
}

.camera-preview-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border-radius: clamp(12px, 1.5vw, 15px);
    overflow: visible;
    aspect-ratio: 16/9;
    max-width: 100%;
    max-height: 50vh;
}

.video-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: clamp(12px, 1.5vw, 15px);
    z-index: 1;
}

.captured-image-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: right;
    align-items: right;
    background: #000;
    border-radius: clamp(12px, 1.5vw, 15px);
    overflow: hidden;
    aspect-ratio: 16/9;
    max-height: 40vh;
}

.captured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: clamp(12px, 1.5vw, 15px);
}

.controls-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1vh;
}

.primary-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.file-upload-container {
    position: relative;
    display: inline-block;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.btn-upload {
    font-family: Papyrus, fantasy;
    background: linear-gradient(90deg, #4a6b2a 0%, #6b8e47 50%, #4a6b2a 100%);
    color: #fff !important;
    border: none;
    padding: clamp(1rem, 2.5vw, 1.25rem) clamp(2rem, 5vw, 3rem);
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    min-width: clamp(150px, 25vw, 200px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 1vh 2.5vh rgba(74, 107, 42, 0.4);
    background: linear-gradient(90deg, #3a5b1a 0%, #5b7e37 50%, #3a5b1a 100%);
}

.btn {
    padding: clamp(0.6rem, 1.5vw, 0.75rem) clamp(1.5rem, 3vw, 2rem);
    border: none;
    border-radius: 50px;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #ebc495;
    border: 2px solid rgba(77, 48, 3, 0.2);
}

.btn-secondary:hover {
    background: rgb(156, 115, 68);
    transform: translateY(-2px);
    box-shadow: 0 0.5vh 1.5vh rgba(0, 0, 0, 0.1);
}

.btn-capture {
    font-family: Papyrus, fantasy;
    background: linear-gradient(90deg, #B6862C 0%, #E6C36F 50%, #B6862C 100%);
    color: #fff !important;
    border: none;
    padding: clamp(1rem, 2.5vw, 1.25rem) clamp(2rem, 5vw, 3rem);
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    min-width: clamp(150px, 25vw, 200px);
}

.btn-capture:hover {
    transform: translateY(-2px);
    box-shadow: 0 1vh 2.5vh rgba(255, 107, 107, 0.4);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    .app {
        padding: 1vh 2vw;
    }

    .main-container {
        gap: 1.5vh;
        max-width: 95vw;
    }

    .preview-section {
        padding: 1.5vh 2vw;
        max-width: 80vw;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .primary-controls {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .btn-capture, .btn-upload {
        width: 100%;
        max-width: clamp(250px, 60vw, 300px);
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .app {
        padding: 0.5vh 1vw;
    }

    .main-container {
        gap: 1vh;
        max-width: 98vw;
    }

    .preview-section {
        padding: 1vh 2vw;
        max-width: 95vw;
        min-width: 280px;
    }

    .camera-preview-container,
    .captured-image-container {
        aspect-ratio: 1/1;
        max-height: 60vh;
    }

    .btn {
        padding: clamp(0.7rem, 2vw, 0.9rem) clamp(1.2rem, 4vw, 1.5rem);
        font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    }

    .btn-capture {
        padding: clamp(0.8rem, 2.5vw, 1rem) clamp(1.5rem, 5vw, 2rem);
        font-size: clamp(0.9rem, 2.4vw, 1rem);
    }
}

.fact-bar {
    position: relative;
    width: 100%;
    max-width: 90vw;
           background: transparent;
        bottom: 0;
        width: 60%;
    backdrop-filter: blur(10px);
    border-radius: clamp(10px, 2vw, 15px);
    text-align: center;
    padding: 2vh 3vw;
    margin-top: 2vh;
    z-index: 10;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 3.4px solid #B6862C;
}

.fact-text {
    font-size: clamp(0.8rem, 2vw, 1rem);
    animation: fadeInOut 10s ease-in-out infinite;
    color:white;
        /* text-shadow removed for no glow */
    animation: fadeInOut 10s ease-in-out infinite;
    font-weight: 600;
    margin: 0;
}

.slideUp {
    animation: slideUp 1s ease-out forwards;
    width: clamp(180px, 15vw, 220px);
    max-width: 20vw;
    height: auto;
    display: block;
    position: static;
    margin-left: 2vw;
}

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

@keyframes fadeInOut {
    0%   { opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes breathingGlow {
    0% { 
        text-shadow: 0 0 5px #39ff39, 0 0 10px #39ff39, 0 0 15px #39ff39;
        opacity: 0.8;
    }
    50% { 
        text-shadow: 0 0 10px #39ff39, 0 0 20px #39ff39, 0 0 30px #39ff39, 0 0 40px #39ff39;
        opacity: 1;
    }
    100% { 
        text-shadow: 0 0 5px #39ff39, 0 0 10px #39ff39, 0 0 15px #39ff39;
        opacity: 0.8;
    }
}

.prediction-panel {
    position: absolute;
    inset: 0;
    margin: 0; 
    background: rgba(255,255,255,0.96);
    border-radius: clamp(10px, 1.2vw, 12px);
    padding: clamp(0.5rem, 2vw, 1rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 0.8vh 4vh rgba(0,0,0,0.15);
    color: #113322;
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    font-family: Verdana, Geneva, Tahoma, sans-serif, -apple-system, BlinkMacSystemFont, cursive;
    z-index: 60;
}

.prediction-panel h4 { 
    margin: 0 0 0.3rem 0; 
    font-size: clamp(0.9rem, 2vw, 1.15rem); 
}

.prediction-panel .line { 
    margin: 0.4rem 0; 
    font-size: clamp(0.85rem, 1.9vw, 1.05rem); 
}

.thank-you {
    margin-top: 8px;
    font-size: clamp(0.82rem, 1.6vw, 0.95rem);
    color: #2a6a3b;
    opacity: 0.95;
}

/* Goddess figure caption overlay */
.goddess-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.goddess-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.goddess-caption {
    position: static;
    transform: none;
    margin-top: 0.6rem;
    background: rgba(255,255,255,0.95);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: clamp(0.75rem, 1.4vw, 0.9rem);
    color: #214b32;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-align: center;
    pointer-events: auto;
}

@media (max-width: 900px) {
    .goddess-caption { margin-top: 0.4rem; padding: 5px 8px; }
}

@media (max-width: 480px) {
    .prediction-panel { 
        font-size: clamp(0.75rem, 2.2vw, 0.88rem); 
        padding: clamp(0.3rem, 1.5vw, 0.5rem); 
    }
}