:root[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --accent: #918769;
    --shadow: rgba(0, 0, 0, 0.1);
    --danger: #dc3545;
    --success: #28a745;
    --box1: #f5f5f5;
    --box2: #fff9d9;
    --box3: #ffefef;
    --box4: #e2f6e7;
    --box5: #e6f6f7;
}

:root[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #f5f5f5;
    --accent: #a59a7c;
    --shadow: rgba(0, 0, 0, 0.3);
    --danger: #dc3545;
    --success: #28a745;
    --box1: #1a1a1a;
    --box2: #292719;
    --box3: #2f0000;
    --box4: #002500;
    --box5: #131526;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

body.login-page {
    background: #000000;
}

/* Header */
.header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3d3d3d;
}

.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Header nav */

.content-switcher {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.content-switcher .switch-btn {
    font-family: 'Jura', sans-serif;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0.5rem 0;
    position: relative;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: lowercase;
}

/* Text color for light/dark themes */
[data-theme="light"] .content-switcher .switch-btn {
    font-size: 1.2em;
    color: #666666;
}

[data-theme="light"] .content-switcher .switch-btn:hover {
    color: #000000;
}

[data-theme="dark"] .content-switcher .switch-btn {
    font-size: 1.2em;
    color: #aaaaaa;
}

[data-theme="dark"] .content-switcher .switch-btn:hover {
    color: #ffffff;
}

/* Animated underline */
.content-switcher .switch-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    left: 50%;
    bottom: 0;
    background: currentColor;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.content-switcher .switch-btn:hover::after {
    width: 100%;
}

/* Active state */
.content-switcher .switch-btn.active {
    opacity: 1;
}

.content-switcher .switch-btn.active::after {
    width: 100%;
}

/* Buttons */
button {
    background: var(--accent);
    color: var(--bg-secondary);
    border: none;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 800;
    transition: opacity 0.3s;
}

button:hover {
    opacity: 0.9;
}

/* Visibility switch */

.visibility-switch {
    padding: 0.5rem;
    background: transparent;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.visibility-switch svg {
    fill: var(--text-primary);
}

.hidden-icon {
    display: none;
}

[data-visibility="hidden"] .visible-icon {
    display: none;
    transition: filter 0.3s ease;
}

[data-visibility="hidden"] .hidden-icon {
    display: block;
}

/* Content blur */
.note-card .note-header h3,
.note-card .note-content,
.note-card .position-details,
.note-card .crypto-content,
.expand-button + time,
.expand-button,
.card-actions,
time,
.summary-stats,
.note-card p {
    transition: filter 0.3s ease;
 }

[data-visibility="hidden"] .note-card .note-header h3,
[data-visibility="hidden"] .note-card .note-content,
[data-visibility="hidden"] .note-card .position-details,
[data-visibility="hidden"] .note-card .crypto-content,
[data-visibility="hidden"] .expand-button + time,
[data-visibility="hidden"] .expand-button,
[data-visibility="hidden"] .card-actions,
[data-visibility="hidden"] time,
[data-visibility="hidden"] .summary-stats,
[data-visibility="hidden"] .note-card p {  /* Add this line */
    filter: blur(5px);
 }

/* Theme Switch */
.theme-switch {
    padding: 0.5rem;
    background: transparent;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.icon-container {
    position: relative;
    width: 24px;
    height: 24px;
}

.theme-switch svg {
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
    fill: var(--text-primary);
}

.moon-icon {
    opacity: 0;
    transform: rotate(-90deg);
    fill: var(--text-primary);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--bg-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 6px;
    font-family: 'Monaco', 'Consolas', monospace;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    outline: none;
}

/* Login */
/* Pattern Lock Styles */
.pattern-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

#pattern-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

#grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    height: 100%;
    z-index: 3;
    padding: 20px;
}

.circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgb(18 0 172 / 40%);
    border: 2px solid rgb(0 0 0 / 50%);
    margin: auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.circle:hover {
    background: rgb(0 37 253 / 52%);
    box-shadow: 0 0 20px rgb(28 0 255 / 70%);
}

.circle.active {
    background: rgba(33, 40, 243, 0.5);
    border-color: #000000;
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(47, 33, 243, 0.6);
}

/* Error */

.error-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.error-overlay .main-text {
    font-size: 3rem;
    font-weight: bold;
    color: #000000;
    margin-bottom: 1rem;
    -webkit-text-stroke: 2px #b8b8b8;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.error-overlay .attempts-text {
    font-size: 2rem;
    color: #fff;
    -webkit-text-stroke: 1px #141647;
}

.error-overlay.show {
    opacity: 1;
}

.access-denied {
    position: fixed;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff4444;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 3px 3px 0 rgba(255, 68, 68, 0.2);
    -webkit-text-stroke: 1px rgba(255, 68, 68, 0.5);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }

    .login-form {
        padding: 1.5rem;
    }

    .pattern-container {
        width: 280px;
        height: 280px;
    }

    .circle {
        width: 45px;
        height: 45px;
    }

    .header-controls {
        display: flex;
        gap: 8px;
        margin-top: 1rem;
    }

    .content-switcher {
        order: -1;
        width: 100%;
    }

    .content-switcher .switch-btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

/* Starfield Styles */

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.login-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

/* Update existing login form styles */
.login-form {
    backdrop-filter: blur(1px);
}

.login-message {
    text-align: center;
    color: #fff;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
}