:root {
    --bg-color: #0c0c1a;
    --container-bg: rgba(18, 18, 30, 0.85);
    --inner-card-bg: rgba(25, 25, 40, 0.5);
    --border-color: rgba(60, 60, 90, 0.25);
    --accent-color: #5b5fcf;
    --accent-glow: rgba(91, 95, 207, 0.2);
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #f0f0f5;
    --text-secondary: #787890;
}

body {
    margin: 0;
    padding: 2rem 0;
    background-color: #0c0c0c;
    background-image: linear-gradient(135deg, #191440 0%, #0c0c0c 50%, #2e182b 100%);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 700px;
    /* Default for pages like Privacy, Terms, FAQ, Guide */
    padding: 3rem;
    background: var(--container-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(60, 60, 90, 0.05), 0 4px 20px -5px rgba(0, 0, 0, 0.4);
    position: relative;
    text-align: left;
    /* Default alignment */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.container.home-container {
    max-width: 480px;
    text-align: center;
}

@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
        /* Reduce padding on mobile */
        width: 90%;
        /* Ensure it fits nicely with some margin */
    }

    .drop-zone {
        padding: 1.5rem 1rem;
        /* Compact dropzone */
    }

    h1 {
        font-size: 1.8rem;
        /* Smaller title */
    }
}

h1 {
    margin: 0;
    font-size: 2rem;
}

h2 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

p {
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

li {
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-color);
}

/* Home / App Specific Styles */
.drop-zone {
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 8px 25px -8px var(--accent-glow);
    overflow: hidden;
    text-align: center;
}

.drop-zone:hover,
.drop-zone.dragover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -5px var(--accent-glow);
}

.icon-upload {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
    transition: all 0.3s;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.drop-zone input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    display: block;
}

.input-group {
    margin-bottom: 2rem;
    text-align: left;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

input[type="password"] {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: #0e0e1a;
    color: var(--text-primary);
    font-size: 1.1rem;
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s;
    font-family: monospace;
    letter-spacing: 2px;
    box-shadow: none;
}

input[type="password"]:focus {
    border-color: var(--accent-color);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

button {
    width: 100%;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid rgba(60, 60, 90, 0.3);
    background-color: #1a1a24;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 0 1px rgba(60, 60, 90, 0.1), 0 4px 16px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

button:hover {
    transform: translateY(-2px);
    background: rgba(50, 50, 65, 0.7);
    box-shadow: 0 0 0 1px rgba(60, 60, 90, 0.2), 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(91, 95, 207, 0.4);
}

button:disabled {
    background: rgba(25, 25, 35, 0.5);
    border-color: rgba(60, 60, 90, 0.2);
    color: rgba(120, 120, 144, 0.5);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Common Navigation & Footer Helpers */
.back-link,
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link:hover,
.back-btn:hover {
    color: var(--accent-color);
}

/* Lock UI (from Index) */
.lock-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s;
    text-align: left;
}

.lock-section:hover {
    border-color: rgba(91, 95, 207, 0.4);
}

.lock-header {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
}

.lock-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.lock-toggle input {
    display: none;
}

.toggle-visual {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
}

.toggle-visual::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.lock-toggle input:checked+.toggle-visual {
    border-color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-glow);
}

.lock-toggle input:checked+.toggle-visual::after {
    opacity: 1;
    transform: scale(1);
}

.toggle-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.lock-toggle input:checked~.toggle-label {
    color: var(--text-primary);
}

.badge {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.badge.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.lock-body {
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

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

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

.time-inputs {
    display: flex;
    gap: 8px;
}

.time-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0e0e1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px;
}

.time-field input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    text-align: center;
    padding: 5px 0;
    outline: none;
    font-family: monospace;
}

.time-field span {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.lock-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
    margin-bottom: 0;
}

/* FAQ Accordion Styles */
.accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem;
}

.accordion-header {
    width: 100%;
    padding: 1rem 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.accordion-header:hover {
    color: var(--accent-color);
}

.accordion-icon {
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.active .accordion-icon {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--accent-color);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.active .accordion-content {
    padding-bottom: 1.5rem;
}

/* Guide Step Styles */
.step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-num {
    background: var(--accent-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--accent-glow);
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

/* Utilities */
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    background-color: #1a1a24;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 1px solid rgba(60, 60, 90, 0.3);
    margin-top: 2rem;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    background: rgba(50, 50, 65, 0.7);
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Spinner and Status */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

.status-percent {
    color: var(--accent-color);
    font-weight: bold;
    min-width: 45px;
    text-align: right;
}

#status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-top: 1.5rem;
    overflow: hidden;
    display: none;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), #818cf8);
    border-radius: 3px;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--accent-glow);
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
    text-align: left;
    position: relative;
    pointer-events: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

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

.file-item .name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
    flex-grow: 1;
}

.file-item .size {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-right: 10px;
    white-space: nowrap;
}

.file-item .remove-btn {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
    box-shadow: none;
    width: auto;
}

.file-item .remove-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Remove arrows/spinners from number inputs */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

/* Shake Animation for Error Feedback */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}