/* Premium Cybernetic Assessment Theme for Password Personality Test */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8b5cf6;
    --primary-bright: #d946ef;
    --primary-glow: rgba(139, 92, 246, 0.15);
    
    --bg-dark: #05040a;
    --bg-card: rgba(15, 12, 33, 0.6);
    --border-color: rgba(139, 92, 246, 0.25);
    --border-glow: rgba(139, 92, 246, 0.45);
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --shadow-glow: 0 10px 40px rgba(139, 92, 246, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(217, 70, 239, 0.1) 0px, transparent 50%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
    display: block;
}

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

/* ==========================================================================
   1. Welcome Screen
   ========================================================================== */
.welcome-content {
    min-height: 100vh;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 30%, #d946ef 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 3rem;
}

.floating-emojis {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.emoji {
    font-size: 2.5rem;
    animation: bounce 3.5s ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(8deg); }
}

.quiz-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 3.5rem;
}

.preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.2);
}

.preview-emoji {
    font-size: 2.2rem;
}

.preview-card p {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e2e8f0;
}

.start-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-bright));
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 18px 45px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.6);
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2rem;
}

/* ==========================================================================
   2. Quiz Screen (Split Dashboard Layout)
   ========================================================================== */
.quiz-split-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 100vh;
    width: 100%;
}

@media (max-width: 992px) {
    .quiz-split-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

.quiz-left-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 5rem;
    background: rgba(7, 6, 15, 0.45);
    border-right: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .quiz-left-panel {
        padding: 3rem 2rem;
    }
}

.quiz-right-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    background: rgba(11, 8, 25, 0.55);
    backdrop-filter: blur(12px);
}

@media (max-width: 992px) {
    .quiz-right-panel {
        padding: 3rem 2rem;
        border-top: 1px solid var(--border-color);
    }
}

.quiz-header {
    width: 100%;
    margin-bottom: 2.5rem;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-bright));
    width: 0%;
    transition: width 0.35s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.question-container {
    width: 100%;
}

.question-card {
    display: flex;
    flex-direction: column;
}

.question-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2.5rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.option-button {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #e4e4e7;
    padding: 18px 24px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.option-button:hover {
    background: rgba(139, 92, 246, 0.09);
    border-color: var(--primary);
    color: #ffffff;
    padding-left: 32px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

/* DNA Metrics Visualizer Panel */
.dna-telemetry-card {
    width: 100%;
    max-width: 440px;
    background: rgba(15, 12, 33, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-glow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dna-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-bright);
    box-shadow: 0 0 10px var(--primary-bright);
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.dna-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff;
}

.dna-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.dna-metrics-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dna-metric-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.3s ease;
}

.metric-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
}

.metric-label {
    color: #e4e4e7;
}

.metric-val {
    font-family: 'Space Mono', monospace;
    color: #ffffff;
}

.metric-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.dna-visualization-box {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    height: 130px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dna-visualization-box canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================================================
   3. Results Dashboard
   ========================================================================== */
.results-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Left Column: Reveal & Traits */
.personality-reveal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-glow);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.personality-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

.personality-type {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    line-height: 1.15;
}

.personality-code {
    display: inline-block;
    background: rgba(139, 92, 246, 0.15);
    color: #d946ef;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    border: 1px solid var(--border-color);
}

.description-section {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #cbd5e1;
    text-align: left;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
}

.traits-section {
    width: 100%;
    text-align: left;
    margin-top: 1rem;
}

.traits-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.traits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.trait-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 14px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e4e4e7;
    transition: all 0.2s ease;
}

.trait-card:hover {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
}

/* Diagnostic Box / Fact Sheet */
.fun-fact {
    background: rgba(11, 8, 25, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.fun-fact-header {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary-bright);
    margin-bottom: 10px;
}

.fun-fact p {
    font-size: 0.98rem;
    color: #e2e8f0;
    line-height: 1.6;
}

.security-tips {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 12px;
    font-size: 0.9rem !important;
}

.security-tips strong {
    color: #33ff33;
}

/* Action Buttons below DNA */
.action-buttons {
    display: flex;
    gap: 14px;
}

@media (max-width: 480px) {
    .action-buttons {
        flex-direction: column;
    }
}

.retake-btn, .share-btn {
    flex: 1;
    font-family: 'Outfit', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 16px 20px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    text-align: center;
}

.retake-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: #ffffff;
}

.retake-btn:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--primary);
}

.share-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-bright));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

/* Right Column: Password Workbench & Sandbox */
.password-section {
    background: rgba(15, 12, 33, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-glow);
    margin-bottom: 2rem;
}

.password-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.password-display {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.password-output {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 20px;
    border-radius: 12px;
    font-family: 'Space Mono', monospace;
    font-size: 1.35rem;
    color: #ffffff;
    outline: none;
    letter-spacing: 1px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.copy-btn:hover {
    background: var(--primary-bright);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.5);
}

.password-meter {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.meter-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.password-strength {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: right;
    letter-spacing: 0.5px;
}

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

.password-workbench h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #e4e4e7;
    text-transform: uppercase;
}

.workbench-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.control-label span {
    color: var(--primary-bright);
    font-family: 'Space Mono', monospace;
    font-weight: 700;
}

.slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-bright);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-bright);
    transition: transform 0.1s;
}

.slider::-webkit-slider-thumb:active {
    transform: scale(1.25);
}

.workbench-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-bright);
    cursor: pointer;
}

.btn-workbench-reroll {
    background: rgba(255, 255, 255, 0.02);
    color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

.btn-workbench-reroll:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.password-analytics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 1rem;
}

.analytic-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 14px 8px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.analytic-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.8px;
}

.analytic-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

/* ==========================================================================
   4. Reverse Password Sandbox Analyzer
   ========================================================================== */
.password-sandbox-analyzer {
    background: rgba(15, 12, 33, 0.45);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-glow);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.password-sandbox-analyzer h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.sandbox-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.sandbox-input-wrapper {
    position: relative;
    width: 100%;
}

.sandbox-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 20px;
    padding-right: 90px;
    border-radius: 12px;
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    color: #ffffff;
    outline: none;
    letter-spacing: 0.5px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}

.sandbox-input:focus {
    border-color: var(--primary-bright);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 15px rgba(217, 70, 239, 0.25);
}

.sandbox-character-count {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.sandbox-match-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px dashed var(--border-color);
    padding: 1.25rem;
    border-radius: 14px;
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.match-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.match-percentage {
    color: var(--primary-bright);
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
}

.match-explanation {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ==========================================================================
   5. General Utility & Toasts
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 50px);
    background: rgba(15, 12, 33, 0.95);
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}