/* JewScan Page Styles - Premium Edition */

.jewscan-page {
    min-height: 100vh;
    background: #030508;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

/* Subtle star background */
.jewscan-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.15), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.12), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.08), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.06), transparent),
        radial-gradient(1px 1px at 200px 50px, rgba(255,255,255,0.12), transparent),
        radial-gradient(1px 1px at 220px 150px, rgba(255,255,255,0.08), transparent),
        radial-gradient(1px 1px at 280px 90px, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 320px 180px, rgba(255,255,255,0.07), transparent),
        radial-gradient(1px 1px at 380px 30px, rgba(255,255,255,0.11), transparent),
        radial-gradient(1px 1px at 420px 120px, rgba(255,255,255,0.09), transparent),
        radial-gradient(1px 1px at 480px 70px, rgba(255,255,255,0.08), transparent),
        radial-gradient(1px 1px at 520px 160px, rgba(255,255,255,0.12), transparent),
        radial-gradient(1px 1px at 580px 40px, rgba(255,255,255,0.06), transparent),
        radial-gradient(1px 1px at 640px 130px, rgba(255,255,255,0.1), transparent);
    background-size: 700px 200px;
    animation: starFloat 60s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes starFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-200px); }
}

.jewscan-main {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: calc(100vh - 60px);
}

/* Two Column Layout */
.jewscan-layout {
    display: flex;
    gap: 6rem;
    max-width: 1200px;
    width: 100%;
    align-items: flex-start;
}

/* Left Side - AI Info */
.jewscan-info {
    flex: 1;
    max-width: 400px;
}

.jewscan-logo-large {
    width: 180px;
    height: auto;
    margin-bottom: 3.5rem;
    opacity: 0.95;
}

/* AI Features */
.ai-features {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.ai-feature {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.ai-feature-number {
    font-size: 0.625rem;
    font-weight: 600;
    color: rgba(100, 140, 200, 0.5);
    flex-shrink: 0;
    width: 1.75rem;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    letter-spacing: 0.15em;
    padding-top: 0.2rem;
}

.ai-feature-text h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 0.5rem;
    letter-spacing: 0.02em;
}

.ai-feature-text p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* Right Side - Scan Container */
.jewscan-container {
    width: 100%;
    max-width: 560px;
    flex-shrink: 0;
}

/* Main Card */
.jewscan-card {
    background: transparent;
    border: none;
    padding: 0;
}

/* Upload Area */
.jewscan-upload-area {
    margin-bottom: 0;
}

.upload-zone {
    position: relative;
    border: 1px solid rgba(100, 140, 200, 0.12);
    border-radius: 2px;
    padding: 5rem 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(20, 30, 50, 0.15);
}

.upload-zone:hover {
    border-color: rgba(100, 140, 200, 0.25);
    background: rgba(25, 35, 60, 0.2);
}

.upload-zone.dragover {
    border-color: rgba(100, 150, 220, 0.4);
    background: rgba(30, 45, 70, 0.25);
}

.upload-icon-ring {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(100, 140, 200, 0.15);
    border-radius: 2px;
}

.upload-icon {
    width: 1.75rem;
    height: 1.75rem;
    color: rgba(100, 140, 200, 0.5);
}

.upload-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 0.75rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.upload-hint {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
    letter-spacing: 0.02em;
}

.upload-formats {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.format-tag {
    padding: 0.375rem 0;
    background: transparent;
    border: none;
    font-size: 0.625rem;
    color: rgba(100, 140, 200, 0.4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

/* Preview Area */
.jewscan-preview-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 4/3;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.face-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.jewscan-actions {
    display: flex;
    gap: 0.75rem;
}

/* Buttons - Apple iOS Glass UI */
.jewscan-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.01em;
    border: none;
}

.jewscan-btn svg {
    width: 1rem;
    height: 1rem;
    opacity: 0.8;
}

.jewscan-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.jewscan-btn.primary {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.jewscan-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Results Area */
.jewscan-results-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.results-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.results-panel {
    background: rgba(10, 15, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(100, 140, 200, 0.08);
}

.results-title {
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.results-confidence {
    font-size: 0.6875rem;
    color: #4ade80;
    background: transparent;
    padding: 0;
    font-weight: 500;
    font-family: 'SF Mono', Monaco, monospace;
    letter-spacing: 0.05em;
}

.ethnicity-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.primary-result {
    text-align: center;
    padding: 2rem 0;
}

/* Big percentage display */
.result-percentage {
    font-family: 'Manrope', -apple-system, sans-serif;
    font-size: 6rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.98);
    line-height: 1;
    margin-bottom: 0.75rem;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    animation: percentageDrop 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    letter-spacing: -0.02em;
}

@keyframes percentageDrop {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-percentage .percent-symbol {
    font-size: 2.5rem;
    font-weight: 600;
    opacity: 0.5;
    margin-left: 0.125rem;
}

.result-label {
    font-family: 'Manrope', -apple-system, sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 0.4s ease 0.25s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.result-badge {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-family: 'Manrope', -apple-system, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid;
    opacity: 0;
    transform: translateY(8px);
    animation: badgeFadeIn 0.4s ease 0.4s forwards;
}

@keyframes badgeFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ethnicity-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.breakdown-title {
    font-family: 'Manrope', -apple-system, sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0 0 0.75rem;
    opacity: 0;
    animation: fadeIn 0.4s ease 0.6s forwards;
}

.ethnicity-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    opacity: 0;
    transform: translateX(-10px);
    animation: itemSlideIn 0.4s ease forwards;
}

.ethnicity-item:nth-child(2) { animation-delay: 0.7s; }
.ethnicity-item:nth-child(3) { animation-delay: 0.8s; }
.ethnicity-item:nth-child(4) { animation-delay: 0.9s; }
.ethnicity-item:nth-child(5) { animation-delay: 1s; }

@keyframes itemSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ethnicity-label {
    width: 130px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.ethnicity-bar-container {
    flex: 1;
    height: 3px;
    background: rgba(100, 140, 200, 0.08);
    border-radius: 0;
    overflow: hidden;
}

.ethnicity-bar {
    height: 100%;
    border-radius: 0;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ethnicity-bar.jewish {
    background: rgba(80, 120, 180, 0.9);
}

.ethnicity-bar.other {
    background: rgba(255, 255, 255, 0.15);
}

.ethnicity-percent {
    width: 45px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
    font-family: 'SF Mono', Monaco, monospace;
    letter-spacing: 0.05em;
}

.results-actions {
    margin-top: 0.5rem;
}

/* Analysis Text */
.analysis-text {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(100, 140, 200, 0.06);
}

.analysis-text p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.7;
    margin: 0.75rem 0 0;
    letter-spacing: 0.01em;
}

/* Loading - Premium Style */
.jewscan-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    min-height: 300px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    position: relative;
    margin-bottom: 2.5rem;
}

.loading-spinner::before,
.loading-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid transparent;
}

.loading-spinner::before {
    border-top-color: rgba(255, 255, 255, 0.8);
    animation: spinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loading-spinner::after {
    inset: 8px;
    border-right-color: rgba(255, 255, 255, 0.3);
    animation: spinnerRotate 1.8s cubic-bezier(0.5, 0, 0.5, 1) infinite reverse;
}

@keyframes spinnerRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-family: 'Manrope', -apple-system, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    letter-spacing: 0.1em;
    animation: textFade 2s ease-in-out infinite;
}

@keyframes textFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

.loading-subtext {
    font-family: 'Manrope', -apple-system, sans-serif;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 0.75rem;
    letter-spacing: 0.05em;
}

/* Scanning icon animation */
.scanning-icon {
    animation: spin 1s linear infinite;
}

/* Scan Line Animation */
.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 140, 200, 0.6), transparent);
    opacity: 0;
    top: 0;
}

.scan-line.active {
    opacity: 1;
    animation: scanLine 2.5s linear infinite;
}

@keyframes scanLine {
    0% { top: 0; }
    50% { top: calc(100% - 1px); }
    100% { top: 0; }
}

/* Face Grid */
.face-grid {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.face-grid.active {
    opacity: 1;
}

.face-grid::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    border: 1px solid rgba(100, 140, 200, 0.4);
    border-radius: 0;
}

.face-grid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(100, 140, 200, 0.5);
}

/* Face Marker */
.face-marker {
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    border: 1px solid rgba(100, 140, 200, 0.5);
    border-radius: 0;
}

.face-marker::before,
.face-marker::after {
    content: '';
    position: absolute;
    background: rgba(100, 140, 200, 0.6);
}

.face-marker::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    transform: translateY(-50%);
}

.face-marker::after {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    transform: translateX(-50%);
}

/* Disclaimer */
.jewscan-disclaimer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.2);
    text-align: left;
    line-height: 1.8;
    letter-spacing: 0.02em;
    border-top: 1px solid rgba(100, 140, 200, 0.06);
}

/* Footer */
.jewscan-footer {
    margin-top: 3rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.jewscan-footer a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: color 0.2s ease;
}

.jewscan-footer a:hover {
    color: rgba(255, 255, 255, 0.5);
}

/* Active nav link */
.nav-link.active {
    color: rgba(255, 255, 255, 0.95);
}

/* Responsive */
@media (max-width: 900px) {
    .jewscan-layout {
        flex-direction: column;
        gap: 3rem;
        align-items: center;
    }
    
    .jewscan-info {
        max-width: 520px;
    }
    
    .jewscan-logo-large {
        margin: 0 auto 2rem;
        display: block;
    }
    
    .jewscan-container {
        max-width: 520px;
    }
}

@media (max-width: 640px) {
    .jewscan-main {
        padding: 2rem 1rem 4rem;
    }
    
    .upload-zone {
        padding: 4rem 2rem;
    }
    
    .jewscan-actions {
        flex-direction: column;
    }
    
    .jewscan-logo-large {
        width: 120px;
    }
}
