* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
}

/* Default styles (Light Theme) */
#power-notes-sidebar {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fafafa;
    height: 100vh;
}

.auth-sidebar {
    width: 400px;
    background: #ffffff;
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 24px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #d4d4d4;
    position: relative;
    overflow: hidden;
}

.logo h1 {
    color: #262626;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.logo p {
    color: #737373;
    font-size: 14px;
}

.form-group label {
    display: block;
    color: #262626;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #262626;
    font-weight: 500;
}

.form-group input:focus {
    outline: none;
    border-color: #ffa116;
    box-shadow: 0 0 0 3px rgba(255, 161, 22, 0.1);
    transform: translateY(-1px);
    background: #ffffff;
}

.form-group input::placeholder {
    color: #a3a3a3;
}

.forgot-password a {
    color: #ffa116;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #ff8c00;
}

.btn-google {
    background: white;
    color: #262626;
    border: 2px solid #d4d4d4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.btn-google:hover {
    border-color: #a3a3a3;
    background: #f5f5f5;
}

.divider {
    text-align: center;
    margin: 8px 0;
    position: relative;
    color: #a3a3a3;
    font-size: 14px;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #d4d4d4;
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 16px;
    position: relative;
}

.auth-toggle p {
    color: #737373;
    font-size: 14px;
    margin-bottom: 4px;
}

.auth-toggle button {
    background: none;
    border: none;
    color: #ffa116;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s ease;
}

.auth-toggle button:hover {
    color: #ff8c00;
}

.back-btn {
    background: none;
    border: none;
    color: #ffa116;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    color: #ff8c00;
}

.success-message {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.error-message {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.theme-toggle {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}

.theme-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.loading-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #d4d4d4;
    color: #262626;
}

.spinner {
    border: 4px solid #d4d4d4;
    border-top: 4px solid #ffa116;
}

.loading-text {
    color: #262626;
}

.app-info-section {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.auth-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Light Theme (Explicit) */
body.light #power-notes-sidebar {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fafafa;
    height: 100vh;
}

body.light .auth-sidebar-body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: none;
    /* Hidden in new layout */
}

/* Dark Theme */
body.dark #power-notes-sidebar {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #0f0f0f;
    height: 100vh;
}

body.dark .auth-sidebar-body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: none;
    /* Hidden in new layout */
}

body.dark .auth-sidebar {
    width: 400px;
    background: #1a1a1a;
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 24px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid #3c3c3c;
    position: relative;
    overflow: hidden;
}

body.dark .logo h1 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
}

body.dark .logo p {
    color: #a3a3a3;
    font-size: 14px;
}

body.dark .form-group label {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

body.dark .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #3c3c3c;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #0f0f0f;
    color: #ffffff;
    font-weight: 500;
}

body.dark .form-group input:focus {
    outline: none;
    border-color: #ffa116;
    box-shadow: 0 0 0 3px rgba(255, 161, 22, 0.2);
    transform: translateY(-1px);
    background: #0f0f0f;
}

body.dark .form-group input::placeholder {
    color: #a3a3a3;
}

body.dark .forgot-password a {
    color: #ffa116;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

body.dark .forgot-password a:hover {
    color: #ff8c00;
}

body.dark .btn-google {
    background: #1a1a1a;
    color: #ffffff;
    border: 2px solid #3c3c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

body.dark .btn-google:hover {
    border-color: #a3a3a3;
    background: #262626;
}

body.dark .divider {
    text-align: center;
    margin: 8px 0;
    position: relative;
    color: #a3a3a3;
    font-size: 14px;
}

body.dark .divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #3c3c3c;
}

body.dark .divider span {
    background: rgba(15, 15, 15, 0.95);
    padding: 0 16px;
    position: relative;
}

.auth-toggle p {
    margin-bottom: 4px;
}

body.dark .auth-toggle p {
    color: #a3a3a3;
    font-size: 14px;
}

body.dark .auth-toggle button {
    background: none;
    border: none;
    color: #ffa116;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s ease;
}

body.dark .auth-toggle button:hover {
    color: #ff8c00;
}

body.dark .back-btn {
    background: none;
    border: none;
    color: #ffa116;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark .back-btn:hover {
    color: #ff8c00;
}

/* Common styles for both themes */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid;
}

body.light .sidebar-header {
    border-bottom-color: #4a4a4a;
    background: #3a3a3a;
}

body.dark .sidebar-header {
    border-bottom-color: #4a4a4a;
    background: #2a2a2a;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

body.light .sidebar-title {
    color: #2d3748;
}

body.dark .sidebar-title {
    color: #f7fafc;
}

/* Header buttons container */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Icon button styles */
.icon-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
}

body.light .icon-btn {
    color: #4a5568;
}

body.light .icon-btn:hover {
    background-color: #e2e8f0;
    color: #2d3748;
}

body.dark .icon-btn {
    color: #e2e8f0;
}

body.dark .icon-btn:hover {
    background-color: #4a5568;
    color: #f7fafc;
}

/* Icon styles */
.icon-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.logout-btn {
    color: #e53e3e !important;
}

body.light .logout-btn:hover {
    background-color: #fed7d7 !important;
    color: #c53030 !important;
}

body.dark .logout-btn:hover {
    background-color: #2d1b1b !important;
    color: #fc8181 !important;
}

.auth-sidebar-body {
    height: calc(100vh - 60px);
    overflow-y: scroll;
    display: none;
}

.auth-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 24px 24px 0 0;
}

.logo {
    text-align: center;
    margin-bottom: 48px;
}

.auth-form {
    transition: all 0.3s ease;
}

.form-group {
    margin-bottom: 16px;
}

.forgot-password {
    text-align: right;
    margin-bottom: 48px;
}

.btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #ffa116 0%, #ff8c00 100%);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 161, 22, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    box-shadow: 0 6px 16px rgba(255, 161, 22, 0.4);
    transform: translateY(-1px);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.auth-toggle {
    text-align: center;
    /* margin-top: 24px; */
    /* TODO: Add Google login, Uncomment later during P1 release */
    padding-top: 16px;
}

.hidden {
    display: none;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

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

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

.success-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

body.dark .success-message {
    background: #1a202c;
    border: 1px solid #38a169;
    color: #68d391;
}

body.dark .error-message {
    background: #2d1b1b;
    border: 1px solid #e53e3e;
    color: #fc8181;
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 161, 22, 0.1);
    color: #ffa116;
    border: 2px solid rgba(255, 161, 22, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(255, 161, 22, 0.15);
}

.theme-toggle:hover {
    background: rgba(255, 161, 22, 0.2);
    border-color: rgba(255, 161, 22, 0.4);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 161, 22, 0.25);
}

body.dark .theme-toggle {
    background: rgba(255, 161, 22, 0.15);
    color: #ffa116;
    border-color: rgba(255, 161, 22, 0.3);
}

body.dark .theme-toggle:hover {
    background: rgba(255, 161, 22, 0.25);
    border-color: rgba(255, 161, 22, 0.5);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(180deg);
}

#backToLogin {
    margin-left: auto;
    margin-right: auto;
    margin-top: 35px;
}

#sendResetLinkButton {
    margin-top: 15px;
}

#createAccountButton {
    margin-top: 35px;
}

.sidebar-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

/* Loading Spinner Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #d4d4d4;
    backdrop-filter: blur(20px);
}

body.dark .loading-content {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid #3c3c3c;
    color: #ffffff;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #d4d4d4;
    border-top: 4px solid #ffa116;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

body.dark .spinner {
    border: 4px solid #3c3c3c;
    border-top: 4px solid #ffa116;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    color: #262626;
}

body.dark .loading-text {
    color: #ffffff;
}

/* Two-column layout styles */
.main-content {
    display: flex;
    height: 100%;
    overflow: hidden;
    flex: 1;
}

.app-info-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(135deg, #e5e5e5 0%, #d1d1d1 100%);
    position: relative;
    overflow: hidden;
}

body.dark .app-info-section {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
}

.app-info-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.app-info-content {
    max-width: 500px;
    text-align: center;
    color: #262626;
    position: relative;
    z-index: 1;
}

body.dark .app-info-content {
    color: white;
}

.app-logo {
    margin-bottom: 24px;
}

.app-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #262626;
}

body.dark .app-title {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.app-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
    color: #737373;
}

body.dark .app-subtitle {
    color: white;
}

.features-list {
    text-align: left;
    padding-top: 5px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.9);
}

body.dark .feature-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark .feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    font-size: 1.5rem;
    margin-right: 16px;
    margin-top: 4px;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #262626;
}

.feature-text p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
    margin: 0;
    color: #737373;
}

body.dark .feature-text h3 {
    color: white;
}

body.dark .feature-text p {
    color: white;
}

.auth-section {
    flex: 0 0 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #ebebeb;
}

body.dark .auth-section {
    background: #0f0f0f;
}

/* Update auth-sidebar styles for new layout */
.auth-section .auth-sidebar {
    width: 100%;
    max-width: 400px;
    margin: 0;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .app-info-section {
        flex: 0 0 40vh;
        padding: 20px;
    }

    .auth-section {
        flex: 1;
        padding: 20px;
    }

    .app-title {
        font-size: 2rem;
    }

    .app-subtitle {
        font-size: 1rem;
    }

    .features-list {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-info-section {
        flex: 0 0 30vh;
        padding: 16px;
    }

    .auth-section {
        padding: 16px;
    }

    .app-title {
        font-size: 1.5rem;
    }

    .app-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
}