/* Unlock Vault Page Styles */

:root {
    /* Dark Theme (Default) */
    --bg-page: #000000;
    --bg-container: #0B0E14;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border-color: #1e293b;
    --input-bg: #0B0E14;
    --input-border: #334155;
    --input-focus-border: #bb9954;
    --btn-back-bg: #0F172A;
    --btn-back-text: #e2e8f0;
    --btn-back-border: #334155;
    --btn-next-bg: #bb9954;
    --btn-next-text: #ffffff;
    --btn-next-hover: #bb8a54;
    --success-bg: rgba(16, 185, 129, 0.1);
    --success-border: rgba(16, 185, 129, 0.2);
    --success-text: #34d399;
    --info-blue-bg: rgba(187, 153, 84, 0.08);
    --info-blue-border: rgba(187, 153, 84, 0.2);
    --info-blue-text: #bb9954;
    --info-orange-bg: rgba(249, 115, 22, 0.05);
    --info-orange-border: rgba(249, 115, 22, 0.3);
    --info-orange-text: #fb923c;
    --detail-bg: #11151d;
    --download-bg: #0F172A;
}

[data-theme="light"] {
    /* Light Theme Overrides */
    --bg-page: #f5f5f5;
    --bg-container: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-focus-border: #111827;
    --btn-back-bg: #ffffff;
    --btn-back-text: #374151;
    --btn-back-border: #d1d5db;
    --btn-next-bg: #111827;
    --btn-next-text: #ffffff;
    --btn-next-hover: #000000;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --success-text: #15803d;
    --info-blue-bg: rgba(187, 153, 84, 0.08);
    --info-blue-border: rgba(187, 153, 84, 0.2);
    --info-blue-text: #bb8a54;
    --info-orange-bg: #fff7ed;
    --info-orange-border: #fed7aa;
    --info-orange-text: #c2410c;
    --detail-bg: #f9fafb;
    --download-bg: #f9fafb;
}

body {
    background: var(--bg-page);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    font-family: var(--font-body);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
    flex-direction: column;
}

.unlock-container {
    max-width: 800px;
    width: 100%;
    background: var(--bg-container);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: background 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    /* Ensure glow stays inside */
}

/* Glow Effect */
.unlock-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(187, 153, 84, 0.1),
            transparent 40%);
    pointer-events: none;
    z-index: 2;
}

.unlock-container:hover::before {
    opacity: 1;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.05);
    /* Stays semi-transparent */
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

[data-theme="dark"] .close-btn {
    background: rgba(255, 255, 255, 0.05);
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
    color: var(--text-primary);
}

[data-theme="dark"] .close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Header */
.unlock-header {
    margin-bottom: 2.5rem;
}

.unlock-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.unlock-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.wizard-logo {
    height: 32px;
    width: auto;
    display: block;
    margin-bottom: 1.5rem;
}

.header-separator {
    width: 60px;
    height: 3px;
    background: #bb9954;
    margin: 1rem 0;
    border-radius: 2px;
}

/* Progress Steps */
.wizard-progress {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-container);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.wizard-progress::before {
    display: none;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    color: var(--text-tertiary);
}

.progress-step:not(:last-child)::after {
    content: '›';
    font-size: 1.25rem;
    color: var(--text-tertiary);
    margin-left: 0.25rem;
    margin-right: 0.25rem;
    font-weight: 400;
}

.progress-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.progress-label {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 400;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: normal;
}

/* Active State */
.progress-step.active {
    color: #bb9954;
}

.progress-step.active .progress-number {
    background: #bb9954;
    border-color: #bb9954;
    color: white;
}

.progress-step.active .progress-label {
    color: #bb9954;
    font-weight: 500;
}

/* Completed State */
.progress-step.completed .progress-number {
    background: #bb9954;
    border-color: #bb9954;
    color: white;
}

.progress-step.completed .progress-label {
    color: #bb9954;
}

/* Wizard Content */
.wizard-content {
    min-height: 400px;
    margin-bottom: 2rem;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Step Header */
.step-header {
    margin-bottom: 2rem;
}

.step-number {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px rgba(187, 153, 84, 0.1);
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 1rem;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--input-border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--input-focus-border);
    background: var(--detail-bg);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.upload-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.file-name {
    color: var(--text-primary);
    font-weight: 500;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Info Boxes */
.info-box {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-box.blue {
    background: var(--info-blue-bg);
    border: 1px solid var(--info-blue-border);
    color: var(--info-blue-text);
}

.info-box.orange {
    background: var(--info-orange-bg);
    border: 1px solid var(--info-orange-border);
    color: var(--info-orange-text);
}

/* Security Questions */
.question-group {
    margin-bottom: 1.5rem;
}

/* Key Input with Upload */
.key-input-wrapper {
    position: relative;
}

.key-input-wrapper .form-input {
    padding-right: 3rem;
}

.upload-icon-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon-btn:hover {
    color: var(--text-primary);
}

/* Review Section */
.review-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.review-section:last-of-type {
    border-bottom: none;
}

.review-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.review-value {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

.review-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.review-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.review-list li::before {
    content: '•';
    color: var(--text-tertiary);
    margin-right: 0.75rem;
}

/* Success Box */
.success-box {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--success-text);
}

.success-icon {
    flex-shrink: 0;
    color: var(--success-text);
}

/* Download Section */
.download-section {
    background: var(--download-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.section-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.download-btn {
    background: var(--bg-container);
    border: 1px solid var(--input-border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background: var(--detail-bg);
    border-color: var(--text-primary);
}

/* Vault Details */
.vault-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-section {
    padding: 1.25rem;
    background: var(--detail-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
    word-break: break-all;
}

.content-box {
    background: var(--bg-container);
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Wizard Footer */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.wizard-btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-back {
    background: var(--btn-back-bg);
    border: 1px solid var(--btn-back-border);
    color: var(--btn-back-text);
}

.btn-back:hover {
    background: var(--detail-bg);
    border-color: var(--input-focus-border);
}

.btn-next {
    background: var(--btn-next-bg);
    color: var(--btn-next-text);
    margin-left: auto;
}

.btn-next:hover {
    background: var(--btn-next-hover);
}

/* Toggle Theme Button */
.theme-toggle {
    position: absolute;
    top: 1.5rem;
    right: 4.5rem;
    /* Left of close button */
    background: transparent;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    background: var(--detail-bg);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .unlock-container {
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 1.5rem 1rem;
        min-height: 100vh;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        margin: 0;
    }

    .unlock-header {
        margin-bottom: 1.5rem;
        margin-top: 0;
    }

    .wizard-progress {
        display: none !important;
    }

    .wizard-footer {
        position: sticky;
        bottom: 0;
        background: var(--bg-container);
        padding: 1rem 0;
        margin-top: auto;
        border-top: 1px solid var(--border-color);
        z-index: 10;
        display: flex;
        flex-direction: row;
        gap: 1rem;
    }

    .wizard-btn {
        flex: 1;
    }

    .btn-next {
        margin-left: 0;
    }

    /* Adjust buttons position on mobile */
    .close-btn,
    .theme-toggle {
        top: 1rem;
        position: absolute;
    }

    .close-btn {
        right: 1rem;
    }

    .theme-toggle {
        right: 4rem;
    }

    /* Prevent content overlap with sticky footer */
    .wizard-step {
        padding-bottom: 1rem;
    }
}

/* Footer Styles */
.footer-bottom {
    margin-top: 3rem;
    padding: 2rem 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.footer-bottom-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
}

.footer-logo-img {
    height: 24px;
    width: auto;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}