/* =========================================
   FutureFace AI - Professional Styling
   CSS Variables & Reset
   ========================================= */
:root {
    --bg-dark: #050509; /* گہرا نیلا/سیاہ پس منظر */
    --primary-accent: #7f00ff; /* نیون جامنی */
    --secondary-accent: #e000ff; /* نیون گلابی */
    --text-light: #ffffff; /* سفید متن */
    --text-muted: #a0a0b0; /* مدہم متن */
    --glass-bg: rgba(255, 255, 255, 0.05); /* شیشے کا پس منظر */
    --glass-border: rgba(255, 255, 255, 0.18); /* شیشے کی سرحد */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); /* شیشے کا سایہ */
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1); /* ہموار ٹرانزیشن */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: radial-gradient(at 10% 10%, rgba(127, 0, 255, 0.15) 0px, transparent 50%),
                      radial-gradient(at 90% 90%, rgba(224, 0, 255, 0.15) 0px, transparent 50%);
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }

/* Utility Classes */
.hidden { display: none !important; }

/* Glassmorphism Effect */
.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(15px); /* دھندلا پن */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   Header Section
   ========================================= */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.logo span {
    background: linear-gradient(45deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover { color: var(--text-light); }

.try-now-btn {
    background: linear-gradient(45deg, var(--primary-accent), var(--secondary-accent));
    color: var(--text-light);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(127, 0, 255, 0.4);
}

.try-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 0, 255, 0.6);
}

/* =========================================
   Main Sections General
   ========================================= */
.app-section {
    padding: 60px 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 50px;
}

/* =========================================
   Upload Section (Left)
   ========================================= */
.upload-left {
    flex: 1;
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(127, 0, 255, 0.2);
    border: 1px solid rgba(127, 0, 255, 0.3);
    color: #d1a8ff;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.badge i { margin-right: 6px; }

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

h1 span {
    background: linear-gradient(45deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-left p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 25px;
    max-width: 550px;
}

.features-small {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
}

.features-small span {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

.features-small i {
    color: var(--secondary-accent);
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Drag & Drop Box Styling */
.upload-box {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-box:hover {
    border-color: var(--primary-accent);
    background: rgba(127, 0, 255, 0.03);
}

.upload-box.dragover {
    border-color: var(--secondary-accent);
    background: rgba(224, 0, 255, 0.05);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.8;
}

.upload-box h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.upload-box > p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.choose-file-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.choose-file-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.drag-drop-text {
    font-size: 0.85rem !important;
    color: #6a6a7a !important;
    margin-bottom: 0 !important;
}

/* =========================================
   Example Panel (Right)
   ========================================= */
.upload-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
}

.example-panel {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1; /* بالکل مربع */
    padding: 10px;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.example-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* تصویر کو مکمل بھرنے کے لیے */
    border-radius: var(--radius-md);
}

.ai-prediction-tag {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-prediction-tag span {
    color: var(--secondary-accent);
    font-weight: 700;
}

.comparison-slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary-accent), var(--secondary-accent));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    cursor: ew-resize;
    z-index: 10;
}

.comparison-slider-handle i { margin: 0 2px; opacity: 0.8; }

/* =========================================
   Processing Section
   ========================================= */
.processing-container {
    text-align: center;
    padding: 60px;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Animated Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(127, 0, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-accent);
    border-left-color: var(--secondary-accent);
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    margin-bottom: 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-container h2 { margin-bottom: 15px; font-size: 1.8rem; }
.processing-container p { color: var(--text-muted); margin-bottom: 30px; }

/* Animated Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--primary-accent), var(--secondary-accent));
    width: 0%;
    transition: width 0.1s linear; /* بہت ہموار */
    border-radius: 50px;
}

/* =========================================
   Result Section
   ========================================= */
.result-container {
    width: 100%;
    max-width: 900px;
    padding: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-container h1 { font-size: 2.5rem; margin-bottom: 30px; text-align: center;}

/* Before/After Comparison View */
.comparison-view {
    display: flex;
    gap: 30px;
    width: 100%;
    margin-bottom: 40px;
}

.image-box {
    flex: 1;
    position: relative;
    aspect-ratio: 4/5; /* پورٹریٹ تصاویر کے لیے بہتر */
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-box .label {
    position: absolute;
    top: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    font-size: