/* ============================================
   DeepForm - Jarvis Style UI
   ============================================ */

/* Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #050a18;
    --bg-secondary: #0a1628;
    --cyan-primary: #00d4ff;
    --cyan-secondary: #0090ff;
    --cyan-glow: rgba(0, 212, 255, 0.4);
    --white: #f0f4f8;
    --white-dim: #8aa3be;
    --orange-alert: #ff9500;
    
    /* Video overlay opacity - adjust between 0 (transparent) and 1 (opaque) */
    --video-overlay-opacity: 0.75;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--bg-primary);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   Video Background
   ============================================ */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    opacity: var(--video-overlay-opacity);
}

/* ============================================
   Particles Background
   ============================================ */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--cyan-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    25% { transform: translateY(-30px) translateX(10px); opacity: 0.6; }
    50% { transform: translateY(-15px) translateX(-10px); opacity: 0.3; }
    75% { transform: translateY(-40px) translateX(5px); opacity: 0.5; }
}

/* ============================================
   Main Container
   ============================================ */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================
   Jarvis Circles
   ============================================ */
.jarvis-circles {
    position: absolute;
    width: 600px;
    height: 600px;
    pointer-events: none;
}

.circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid var(--cyan-primary);
    opacity: 0.3;
}

.circle-1 {
    width: 300px;
    height: 300px;
    animation: rotate 20s linear infinite, pulse 4s ease-in-out infinite;
    border-style: dashed;
    border-width: 2px;
}

.circle-2 {
    width: 400px;
    height: 400px;
    animation: rotate 30s linear infinite reverse;
    border-style: solid;
}

.circle-3 {
    width: 500px;
    height: 500px;
    animation: rotate 40s linear infinite;
    border-style: dotted;
}

.circle-4 {
    width: 580px;
    height: 580px;
    animation: rotate 50s linear infinite reverse;
    opacity: 0.15;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* ============================================
   Arcs
   ============================================ */
.arc {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--cyan-primary);
    border-right-color: var(--cyan-primary);
    opacity: 0.8;
}

.arc-1 {
    width: 320px;
    height: 320px;
    animation: rotate 8s linear infinite;
    filter: drop-shadow(0 0 10px var(--cyan-glow));
}

.arc-2 {
    width: 420px;
    height: 420px;
    animation: rotate 12s linear infinite reverse;
    border-top-color: transparent;
    border-left-color: var(--cyan-primary);
    filter: drop-shadow(0 0 8px var(--cyan-glow));
}

.arc-3 {
    width: 250px;
    height: 250px;
    animation: rotate 6s linear infinite;
    border-right-color: transparent;
    border-bottom-color: var(--cyan-primary);
    filter: drop-shadow(0 0 12px var(--cyan-glow));
}

/* ============================================
   Orbit Points
   ============================================ */
.orbit-point {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--cyan-primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    filter: drop-shadow(0 0 10px var(--cyan-primary));
}

.orbit-point-1 {
    animation: orbit1 8s linear infinite;
}

.orbit-point-2 {
    animation: orbit2 12s linear infinite;
    width: 6px;
    height: 6px;
}

.orbit-point-3 {
    animation: orbit3 15s linear infinite;
    width: 4px;
    height: 4px;
}

@keyframes orbit1 {
    from { transform: rotate(0deg) translateX(160px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(160px) rotate(-360deg); }
}

@keyframes orbit2 {
    from { transform: rotate(0deg) translateX(210px) rotate(0deg); }
    to { transform: rotate(-360deg) translateX(210px) rotate(360deg); }
}

@keyframes orbit3 {
    from { transform: rotate(0deg) translateX(260px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(260px) rotate(-360deg); }
}

/* ============================================
   Header & Logo
   ============================================ */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.logo-container {
    margin-bottom: 10px;
    animation: logoFloat 6s ease-in-out infinite;
}

.logo-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.4));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.4)); }
    50% { filter: drop-shadow(0 0 50px rgba(0, 212, 255, 0.7)); }
}

.tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    color: var(--white-dim);
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

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

/* ============================================
   Typewriter Effect
   ============================================ */
.typewriter {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.1rem;
    color: var(--cyan-primary);
    margin-bottom: 40px;
    height: 30px;
    position: relative;
    z-index: 2;
}

.typewriter-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--cyan-primary);
    animation: typing 3s steps(40) 1s forwards, blink 0.8s step-end infinite;
    width: 0;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* ============================================
   Glass Panel
   ============================================ */
.glass-panel {
    background: rgba(10, 22, 40, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: panelAppear 1s ease-out 1.5s forwards;
    box-shadow: 
        0 0 40px rgba(0, 212, 255, 0.1),
        inset 0 0 60px rgba(0, 212, 255, 0.05);
}

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

/* HUD Corners */
.glass-panel::before,
.glass-panel::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--cyan-primary);
    opacity: 0.6;
}

.glass-panel::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
    border-radius: 20px 0 0 0;
}

.glass-panel::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 20px 0;
}

.corner-br, .corner-tl {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--cyan-primary);
    opacity: 0.6;
}

.corner-tl {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
    border-radius: 0 20px 0 0;
}

.corner-br {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 20px;
}

/* HUD Labels */
.hud-label {
    position: absolute;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: var(--cyan-primary);
    opacity: 0.6;
    letter-spacing: 1px;
}

.hud-label-top {
    top: -25px;
    left: 40px;
}

.hud-label-bottom {
    bottom: -25px;
    right: 40px;
}

/* ============================================
   Form Elements
   ============================================ */
.form-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 30px;
    color: var(--white);
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--cyan-primary);
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    color: var(--white);
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: var(--white-dim);
    opacity: 0.5;
}

.form-input:focus {
    border-color: var(--cyan-primary);
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.2),
        inset 0 0 20px rgba(0, 212, 255, 0.05);
}

/* Input wrapper for scan indicator */
.input-wrapper {
    position: relative;
}

/* ============================================
   Scan Indicator
   ============================================ */
.scan-indicator {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: none;
}

.scan-indicator.active {
    display: block;
}

.scan-spinner {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-top-color: var(--cyan-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Button loading state */
.btn-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-top-color: var(--cyan-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================
   Submit Button
   ============================================ */
.submit-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 144, 255, 0.2) 100%);
    border: 1px solid var(--cyan-primary);
    border-radius: 10px;
    color: var(--cyan-primary);
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3) 0%, rgba(0, 144, 255, 0.3) 100%);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.submit-btn:hover::before {
    left: 100%;
}

/* ============================================
   Status Line
   ============================================ */
.status-line {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--white-dim);
    text-align: center;
    margin-top: 20px;
    opacity: 0.6;
}

.status-line .blink {
    animation: blink 1s step-end infinite;
}

/* ============================================
   Scan Results Panel
   ============================================ */
.scan-results {
    position: fixed;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    width: 350px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
    z-index: 3;
}

.scan-results.active {
    opacity: 1;
    pointer-events: auto;
}

.result-panel {
    background: rgba(10, 22, 40, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 15px;
    transform: translateX(50px);
    opacity: 0;
    transition: all 0.5s ease;
}

.scan-results.active .result-panel {
    transform: translateX(0);
    opacity: 1;
}

.scan-results.active .result-panel:nth-child(1) { transition-delay: 0.1s; }
.scan-results.active .result-panel:nth-child(2) { transition-delay: 0.3s; }
.scan-results.active .result-panel:nth-child(3) { transition-delay: 0.5s; }

.result-panel h4 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--cyan-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-panel h4::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--cyan-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    font-size: 0.85rem;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--white-dim);
}

.result-value {
    color: var(--white);
    font-family: 'IBM Plex Mono', monospace;
}

.result-value.alert {
    color: var(--orange-alert);
}

.result-value.success {
    color: var(--cyan-primary);
}

/* ============================================
   Photo Candidates
   ============================================ */
.photo-candidates {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.photo-candidate {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 255, 0.3);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.photo-candidate:hover {
    border-color: var(--cyan-primary);
    box-shadow: 0 0 20px var(--cyan-glow);
    transform: scale(1.1);
}

.photo-candidate img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Scan overlay on photo */
.photo-candidate::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 212, 255, 0.2) 100%);
    animation: scanLine 2s linear infinite;
}

@keyframes scanLine {
    0% { background-position: 0 -100%; }
    100% { background-position: 0 100%; }
}

/* ============================================
   Connection Lines
   ============================================ */
.connection-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-lines svg {
    width: 100%;
    height: 100%;
}

.connection-line {
    stroke: var(--cyan-primary);
    stroke-width: 1;
    fill: none;
    opacity: 0.2;
    stroke-dasharray: 5, 5;
    animation: dashMove 20s linear infinite;
}

@keyframes dashMove {
    to { stroke-dashoffset: -100; }
}

/* ============================================
   Responsive - Tablet
   ============================================ */
@media (max-width: 1200px) {
    .scan-results {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 100%;
        max-width: 500px;
        margin-top: 30px;
    }
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
    .logo-image {
        max-width: 200px;
    }

    .jarvis-circles {
        width: 350px;
        height: 350px;
    }

    .circle-1 { width: 180px; height: 180px; }
    .circle-2 { width: 240px; height: 240px; }
    .circle-3 { width: 300px; height: 300px; }
    .circle-4 { width: 340px; height: 340px; }

    .arc-1 { width: 200px; height: 200px; }
    .arc-2 { width: 260px; height: 260px; }
    .arc-3 { width: 150px; height: 150px; }

    @keyframes orbit1 {
        from { transform: rotate(0deg) translateX(100px) rotate(0deg); }
        to { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
    }

    @keyframes orbit2 {
        from { transform: rotate(0deg) translateX(130px) rotate(0deg); }
        to { transform: rotate(-360deg) translateX(130px) rotate(360deg); }
    }

    @keyframes orbit3 {
        from { transform: rotate(0deg) translateX(160px) rotate(0deg); }
        to { transform: rotate(360deg) translateX(160px) rotate(-360deg); }
    }

    .glass-panel {
        padding: 30px 25px;
    }

    .typewriter {
        font-size: 0.9rem;
    }
}

/* ============================================
   Responsive - Small Mobile
   ============================================ */
@media (max-width: 480px) {
    .logo-image {
        max-width: 160px;
    }

    .tagline {
        font-size: 0.8rem;
    }

    .glass-panel {
        padding: 25px 20px;
    }

    .form-input {
        padding: 12px 15px;
    }
}

/* ============================================
   Preview Panel Enhancements
   ============================================ */
.found-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--cyan-primary), var(--cyan-secondary));
    color: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
    vertical-align: middle;
}

.photo-candidate {
    position: relative;
    transition: all 0.3s ease;
}

.photo-candidate.selected {
    transform: scale(1.1);
    border-color: var(--cyan-primary);
    box-shadow: 0 0 20px var(--cyan-glow);
}

.photo-candidate.selected img {
    border: 3px solid var(--cyan-primary);
}

.photo-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--cyan-primary);
    color: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

.linkedin-info {
    flex: 1;
    padding-left: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.linkedin-headline {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.3;
}

.linkedin-role {
    color: var(--cyan-primary);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.linkedin-company {
    color: var(--white-dim);
    font-size: 0.75rem;
}

.linkedin-searching {
    color: var(--cyan-primary);
    font-size: 0.85rem;
    animation: pulse 1.5s infinite;
}

.linkedin-hint {
    color: var(--white-dim);
    font-size: 0.75rem;
    margin-top: 4px;
}

.not-found-hint {
    color: var(--white-dim);
    font-size: 0.75rem;
    margin-top: 10px;
    font-style: italic;
}

.result-value.small {
    font-size: 0.7rem;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Photo candidates layout fix for single photo */
.photo-candidates {
    display: flex;
    align-items: center;
    gap: 15px;
}

.photo-candidates .photo-candidate:only-child {
    margin-right: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
