/* 
   HERMES INTERVIEW AGENT - Cyberpunk Dark Theme
   GhostMode AI Mock Interview System v1.0
*/

/* ─── SETUP SCREEN ─── */
.hermes-setup {
    max-width: 1100px; margin: 110px auto 60px; padding: 0 20px;
    animation: hermesIn 0.6s ease-out;
}
@keyframes hermesIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }

.setup-header { text-align: center; margin-bottom: 48px; }
.setup-header h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(28px,5vw,44px); font-weight: 800; }
.setup-header h1 .accent { background: linear-gradient(135deg,#8B5CF6,#06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.setup-header p { color: #94A3B8; font-size: 16px; margin-top: 12px; }

.mode-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 20px; margin-bottom: 36px; }
.mode-card {
    background: #0a0a0f; border: 1px solid rgba(255,255,255,0.06); border-radius: 20px;
    padding: 28px 24px; text-align: center; cursor: pointer; transition: 0.3s;
    position: relative; overflow: hidden;
}
.mode-card::before { content:''; position:absolute; inset:0; background: linear-gradient(135deg,rgba(139,92,246,0.08),transparent); opacity:0; transition:0.3s; }
.mode-card:hover::before { opacity:1; }
.mode-card:hover { border-color: #8B5CF6; transform: translateY(-4px); box-shadow: 0 12px 30px rgba(139,92,246,0.15); }
.mode-card.selected { border-color: #8B5CF6; background: rgba(139,92,246,0.06); box-shadow: 0 0 20px rgba(139,92,246,0.2); }
.mode-card .icon { font-size: 2.4rem; margin-bottom: 14px; display: block; }
.mode-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 6px; color: #fff; }
.mode-card p { font-size: 12px; color: #64748B; line-height: 1.4; }

.setup-options { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
@media(max-width:768px) { .setup-options { grid-template-columns: 1fr; } }

.option-group { background: #0a0a0f; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 20px; }
.option-group label { display: block; font-size: 11px; font-weight: 800; color: #8B5CF6; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.option-group textarea, .option-group input, .option-group select {
    width: 100%; background: #111118; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
    color: #fff; padding: 12px; font-size: 13px; resize: none; outline: none; font-family: 'Outfit',sans-serif; transition: 0.3s;
}
.option-group textarea:focus, .option-group input:focus, .option-group select:focus { border-color: #8B5CF6; }
.option-group select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg fill='%238B5CF6' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 36px; }

.btn-start-interview {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    padding: 18px; border: none; border-radius: 14px; font-size: 16px; font-weight: 800; cursor: pointer;
    background: linear-gradient(135deg,#8B5CF6,#6D28D9); color: #fff;
    box-shadow: 0 8px 30px rgba(139,92,246,0.3); transition: 0.3s;
}
.btn-start-interview:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(139,92,246,0.5); }
.btn-start-interview:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── INTERVIEW ROOM ─── */
.hermes-room {
    max-width: 1200px; margin: 100px auto 60px; padding: 0 20px;
    display: none; animation: hermesIn 0.5s ease-out;
}
.room-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.room-title { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.room-title .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: livePulse 1.5s infinite; }
@keyframes livePulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }
.room-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.room-badge { background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.2); padding: 4px 12px; border-radius: 100px; font-size: 11px; font-weight: 700; color: #8B5CF6; }
.room-badge.green { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); color: #10b981; }

.interview-layout { display: grid; grid-template-columns: 1fr 400px; gap: 20px; min-height: 600px; }
@media(max-width:1024px) { .interview-layout { grid-template-columns: 1fr; } }

/* ─── LEFT: AVATAR + CONTROLS ─── */
.avatar-panel {
    background: #08080d; border: 1px solid rgba(255,255,255,0.06); border-radius: 24px;
    display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.avatar-stage {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at center, #12121f 0%, #08080d 70%); position: relative; min-height: 350px;
}
.interviewer-avatar {
    width: 120px; height: 120px; border-radius: 50%; 
    background: linear-gradient(135deg,#1e1b4b,#312e81); border: 3px solid rgba(139,92,246,0.3);
    display: flex; align-items: center; justify-content: center; font-size: 3rem;
    transition: 0.4s; position: relative;
}
.interviewer-avatar.speaking {
    border-color: #8B5CF6; box-shadow: 0 0 40px rgba(139,92,246,0.4);
    animation: avatarPulse 1s ease-in-out infinite;
}
@keyframes avatarPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.interviewer-name { margin-top: 16px; font-size: 16px; font-weight: 800; }
.interviewer-role { font-size: 12px; color: #64748B; margin-top: 4px; }

/* Voice Waves */
.voice-waves {
    display: flex; align-items: center; gap: 3px; height: 40px; margin-top: 20px; opacity: 0; transition: 0.3s;
}
.voice-waves.active { opacity: 1; }
.voice-waves .bar {
    width: 4px; border-radius: 4px; background: linear-gradient(180deg,#8B5CF6,#6D28D9);
    animation: waveBar 0.8s ease-in-out infinite;
}
.voice-waves .bar:nth-child(1) { height: 12px; animation-delay: 0s; }
.voice-waves .bar:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.voice-waves .bar:nth-child(3) { height: 28px; animation-delay: 0.2s; }
.voice-waves .bar:nth-child(4) { height: 36px; animation-delay: 0.3s; }
.voice-waves .bar:nth-child(5) { height: 28px; animation-delay: 0.4s; }
.voice-waves .bar:nth-child(6) { height: 20px; animation-delay: 0.5s; }
.voice-waves .bar:nth-child(7) { height: 12px; animation-delay: 0.6s; }
@keyframes waveBar { 0%,100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

/* Metrics overlay */
.live-metrics {
    position: absolute; top: 16px; left: 16px; right: 16px;
    display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.metric-chip {
    background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.06);
    padding: 5px 12px; border-radius: 100px; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; gap: 6px; color: #94A3B8;
}
.metric-chip .val { color: #8B5CF6; font-weight: 800; }
.metric-chip .val.green { color: #10b981; }
.metric-chip .val.red { color: #ef4444; }

/* Controls */
.control-bar {
    padding: 20px; border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; flex-direction: column; gap: 12px;
}
.control-row { display: flex; gap: 10px; }
.btn-mic-hermes {
    flex: 1; padding: 14px; border: none; border-radius: 12px; font-size: 14px; font-weight: 800;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg,#8B5CF6,#6D28D9); color: #fff; transition: 0.3s;
}
.btn-mic-hermes.listening { background: linear-gradient(135deg,#ef4444,#dc2626); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 70% { box-shadow: 0 0 0 12px rgba(239,68,68,0); } }
.btn-mic-hermes:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ctrl {
    width: 48px; height: 48px; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
    background: rgba(255,255,255,0.03); color: #fff; font-size: 18px; cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.btn-ctrl:hover { border-color: #8B5CF6; background: rgba(139,92,246,0.1); }
.btn-ctrl.active { background: rgba(16,185,129,0.15); border-color: #10b981; color: #10b981; }
.btn-ctrl.danger { border-color: rgba(239,68,68,0.3); }
.btn-ctrl.danger:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

.voice-toggle { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: rgba(255,255,255,0.02); border-radius: 10px; }
.voice-toggle span { font-size: 12px; font-weight: 600; color: #64748B; }

/* ─── RIGHT: CHAT PANEL ─── */
.chat-panel {
    background: #08080d; border: 1px solid rgba(255,255,255,0.06); border-radius: 24px;
    display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel-header {
    padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex; justify-content: space-between; align-items: center;
}
.chat-panel-header h3 { font-size: 14px; font-weight: 800; }
.q-counter { font-size: 11px; font-weight: 700; color: #8B5CF6; background: rgba(139,92,246,0.1); padding: 4px 10px; border-radius: 8px; }

.chat-messages {
    flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
    scroll-behavior: smooth; min-height: 300px; max-height: 500px;
}
.chat-msg {
    padding: 14px 16px; border-radius: 16px; font-size: 14px; line-height: 1.6;
    max-width: 92%; animation: msgIn 0.3s ease-out;
}
@keyframes msgIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

.chat-msg.interviewer {
    background: #111118; border: 1px solid rgba(255,255,255,0.04); align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-msg.candidate {
    background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.15); align-self: flex-end;
    border-bottom-right-radius: 4px; text-align: right;
}
.chat-msg.system {
    background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.15);
    font-size: 12px; color: #10b981; text-align: center; align-self: center;
}
.chat-msg .sender { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; display: block; }
.chat-msg.interviewer .sender { color: #8B5CF6; }
.chat-msg.candidate .sender { color: #06b6d4; }
.chat-msg .tip-inline { margin-top: 8px; padding: 8px 12px; background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.15); border-radius: 8px; font-size: 11px; color: #f59e0b; }

.typing-indicator { display: none; padding: 14px 16px; align-self: flex-start; }
.typing-dots { display: flex; gap: 4px; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: #8B5CF6; animation: typingBounce 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%,60%,100% { transform:translateY(0); } 30% { transform:translateY(-8px); } }

.chat-input-area { padding: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.chat-input-wrap { display: flex; gap: 8px; }
.chat-input-wrap input {
    flex: 1; background: #111118; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
    color: #fff; padding: 12px 14px; font-size: 13px; outline: none; font-family: 'Outfit',sans-serif;
}
.chat-input-wrap input:focus { border-color: #8B5CF6; }
.btn-send {
    width: 44px; height: 44px; border: none; border-radius: 10px;
    background: linear-gradient(135deg,#8B5CF6,#6D28D9); color: #fff; font-size: 16px; cursor: pointer; transition: 0.3s;
}
.btn-send:hover { transform: scale(1.05); }
.btn-send:disabled { opacity: 0.4; }

/* ─── REPORT OVERLAY ─── */
.hermes-report {
    display: none; max-width: 1000px; margin: 100px auto 60px; padding: 0 20px; animation: hermesIn 0.6s;
}
.report-card {
    background: #0a0a0f; border: 1px solid rgba(255,255,255,0.06); border-radius: 24px;
    padding: 40px; position: relative; overflow: hidden;
}
.report-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg,#8B5CF6,#06b6d4,#10b981,#8B5CF6); background-size: 200%;
    animation: reportShine 3s linear infinite;
}
@keyframes reportShine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.report-header { text-align: center; margin-bottom: 36px; }
.report-header h2 { font-family: 'Space Grotesk',sans-serif; font-size: 28px; font-weight: 800; }
.report-header .grade-big {
    display: inline-block; font-size: 48px; font-weight: 900; margin: 16px 0;
    background: linear-gradient(135deg,#8B5CF6,#06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.score-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 16px; margin-bottom: 32px; }
.score-item {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 16px;
    padding: 20px; text-align: center;
}
.score-item .score-val { font-size: 28px; font-weight: 900; color: #8B5CF6; }
.score-item .score-label { font-size: 11px; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.score-bar { height: 4px; background: rgba(255,255,255,0.04); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg,#8B5CF6,#06b6d4); transition: width 1.5s cubic-bezier(0.19,1,0.22,1); }

.feedback-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
@media(max-width:768px) { .feedback-grid { grid-template-columns: 1fr; } }
.feedback-box { padding: 24px; border-radius: 16px; }
.feedback-box.strengths { background: rgba(16,185,129,0.04); border: 1px solid rgba(16,185,129,0.15); }
.feedback-box.weaknesses { background: rgba(239,68,68,0.04); border: 1px solid rgba(239,68,68,0.15); }
.feedback-box h4 { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.feedback-box.strengths h4 { color: #10b981; }
.feedback-box.weaknesses h4 { color: #ef4444; }
.feedback-box ul { list-style: none; padding: 0; }
.feedback-box li { font-size: 13px; color: #94A3B8; padding: 6px 0; padding-left: 20px; position: relative; line-height: 1.5; }
.feedback-box.strengths li::before { content: '✓'; position: absolute; left: 0; color: #10b981; font-weight: 800; }
.feedback-box.weaknesses li::before { content: '!'; position: absolute; left: 0; color: #ef4444; font-weight: 800; }

.summary-box { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 16px; padding: 24px; margin-bottom: 28px; }
.summary-box h4 { font-size: 14px; font-weight: 800; color: #8B5CF6; margin-bottom: 12px; }
.summary-box p { font-size: 14px; color: #94A3B8; line-height: 1.7; }

.roadmap-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.roadmap-tag { background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.15); padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 700; color: #8B5CF6; }

.report-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.report-actions button {
    flex: 1; min-width: 200px; padding: 14px; border-radius: 12px; font-size: 14px; font-weight: 800; cursor: pointer; transition: 0.3s;
}
.btn-retry { background: linear-gradient(135deg,#8B5CF6,#6D28D9); color: #fff; border: none; }
.btn-retry:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139,92,246,0.3); }
.btn-dashboard { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: #fff; }
.btn-dashboard:hover { border-color: #8B5CF6; }

/* ─── WEBCAM PREVIEW ─── */
.webcam-preview {
    position: absolute; bottom: 16px; right: 16px; width: 140px; height: 105px;
    border-radius: 12px; overflow: hidden; border: 2px solid rgba(139,92,246,0.3);
    background: #000;
}
.webcam-preview video { width: 100%; height: 100%; object-fit: cover; }
.webcam-label { position: absolute; bottom: 4px; left: 4px; font-size: 8px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.6); padding: 2px 6px; border-radius: 4px; }

/* ─── SWITCH TOGGLE ─── */
.hermes-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.hermes-switch input { opacity: 0; width: 0; height: 0; }
.hermes-slider { position: absolute; cursor: pointer; inset: 0; background: #333; border-radius: 22px; transition: 0.3s; }
.hermes-slider::before { content:''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s; }
.hermes-switch input:checked + .hermes-slider { background: #8B5CF6; }
.hermes-switch input:checked + .hermes-slider::before { transform: translateX(18px); }
