:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #a855f7;
    --secondary-glow: rgba(168, 85, 247, 0.5);

    --bg-dark: #030014;
    --bg-card: rgba(20, 20, 35, 0.6);
    --bg-card-hover: rgba(30, 30, 45, 0.8);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.15);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
}

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Effects */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -2;
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Globals */
.hidden {
    display: none !important;
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.w-full {
    width: 100%;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

/* Navigation */
.premium-nav {
    background: rgba(3, 0, 20, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
}

.logo-icon i {
    color: #fff;
    font-size: 1.6rem;
}

.logo span {
    color: var(--text-main);
}

.logo strong {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Premium Cards */
.premium-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.premium-card:hover {
    border-color: var(--border-light);
}

/* Buttons */
button {
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    border: none;
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

button:disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(100%);
}

.btn-glow {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.25rem 2.5rem;
    font-size: 1.15rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -5px var(--secondary-glow);
}

.btn-glow:hover::before {
    opacity: 1;
}

.btn-glow-green {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    padding: 1.25rem 2rem;
    font-size: 1.15rem;
}

.btn-glow-green:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.4);
}

.btn-glow-red {
    background: linear-gradient(135deg, #e11d48, #ef4444);
    color: white;
    padding: 1.25rem 2rem;
    font-size: 1.15rem;
}

.btn-glow-red:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -5px rgba(239, 68, 68, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* 1. Setup Area */
.setup-layout {
    max-width: 800px;
    margin: 4rem auto 0;
}

.setup-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.badge-pill {
    display: inline-block;
    padding: 1ch 1.25rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 2rem;
    color: #d8b4fe;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-title span {
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.form-card {
    padding: 3rem;
    position: relative;
}

.card-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.input-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    right: 1.25rem;
    font-size: 1.4rem;
    color: var(--primary);
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 1.25rem 3rem 1.25rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    font-family: inherit;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    transition: all 0.3s ease;
    font-weight: 600;
}

.input-wrapper input::placeholder {
    color: #475569;
    font-weight: 500;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15);
}

.input-wrapper select {
    appearance: none;
}

.input-wrapper select option {
    background: var(--bg-dark);
    color: #fff;
}

/* 2. Interview Area */
.interview-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    height: 80vh;
    min-height: 700px;
}

@media (max-width: 1024px) {
    .interview-split {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* QA Side */
.qa-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 1rem;
}

.q-progress {
    margin-bottom: 2rem;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    color: var(--secondary);
    font-weight: 800;
    font-size: 1.1rem;
}

.q-title {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.4;
    margin-bottom: 2.5rem;
    color: #fff;
    letter-spacing: -0.5px;
}

.transcript-area {
    flex-grow: 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--secondary);
    margin-bottom: 2rem;
}

.transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.95rem;
}

.live-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.transcript-box {
    min-height: 120px;
    font-size: 1.3rem;
    line-height: 1.8;
    color: #e2e8f0;
    font-weight: 600;
}

.placeholder-text {
    color: #475569;
    font-style: italic;
}

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

.action-buttons button {
    flex: 1;
}

/* Video Side */
.video-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 2rem;
    padding: 0;
    border: 1px solid var(--border-light);
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.1);
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    background: #000;
}

.cam-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 0, 20, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.cam-icon-glow {
    width: 100px;
    height: 100px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.2);
}

.cam-icon-glow i {
    font-size: 3rem;
    color: var(--primary);
}

.cam-overlay p {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.rec-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
    z-index: 5;
}

.rec-badge .red-dot {
    background: #ef4444;
}

.video-hud {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 1rem;
    z-index: 5;
}

.hud-item {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: center;
    transition: all 0.3s;
}

.hud-item i {
    font-size: 1.4rem;
}

/* 3. Report Area */
.report-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.8), rgba(10, 10, 20, 0.9));
    overflow: visible;
}

.report-hero-content {
    flex: 1;
    padding-left: 3rem;
}

.report-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.report-hero-content p {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 500px;
}

.report-hero-score {
    width: 250px;
    height: 250px;
    position: relative;
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.3));
}

.circular-chart {
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 2;
}

.glow-circle {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 2s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

.score-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-value span {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.score-value small {
    font-size: 1.1rem;
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.pink-icon {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.purple-icon {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.blue-icon {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

.green-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-data h3 {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.timeline-title {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.timeline-title i {
    color: var(--primary);
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.answer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ans-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.ans-header h4 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    line-height: 1.5;
}

.ans-header h4 i {
    color: var(--secondary);
    font-size: 1.8rem;
    margin-top: 0.2rem;
}

.ans-body {
    padding: 2rem;
}

.ans-metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.metric-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: #cbd5e1;
}

.metric-tag i {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.speech-box {
    background: rgba(0, 0, 0, 0.3);
    border-right: 4px solid var(--primary);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.speech-box p {
    font-size: 1.25rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.8;
}

.eval-box {
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.eval-good {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.eval-good h5 {
    color: var(--success);
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eval-warn {
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.eval-warn h5 {
    color: var(--warning);
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eval-bad {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.eval-bad h5 {
    color: var(--danger);
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eval-box p {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
}

.suggested-answer {
    background: rgba(99, 102, 241, 0.05);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    padding: 2rem;
    border-radius: 1rem;
}

.suggested-answer h5 {
    color: #818cf8;
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggested-answer p {
    font-size: 1.15rem;
    font-weight: 600;
    color: #e2e8f0;
}

/* Loader Overlay */
.premium-loader {
    position: fixed;
    inset: 0;
    background: rgba(3, 0, 20, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem auto;
}

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

.loader-content h3 {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.loader-content p {
    color: var(--secondary);
    font-size: 1.2rem;
    font-weight: 700;
}

/* Responsive Design for Mobile and iPad */
@media (max-width: 1024px) {
    .report-hero {
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        gap: 2rem;
    }

    .report-hero-content {
        padding-left: 0;
    }

    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .setup-layout {
        margin: 2rem auto 0;
    }

    .setup-hero {
        margin-bottom: 2rem;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-desc {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .q-title {
        font-size: 1.8rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }

    .video-side, .qa-side {
        padding: 0;
    }
    
    .stats-grid-4 {
        grid-template-columns: 1fr;
    }

    .report-hero-content h1 {
        font-size: 2.2rem;
    }

    .stat-box {
        padding: 1.5rem;
    }
    
    .ans-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .badge-pill {
        font-size: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }

    .ans-header, .ans-body, .speech-box, .eval-box, .suggested-answer {
        padding: 1.25rem;
    }

    .speech-box p {
        font-size: 1.1rem;
    }

    .metric-tag {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .timeline-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .report-hero-score {
        width: 200px;
        height: 200px;
    }

    .score-value span {
        font-size: 2.5rem;
    }
}
