:root {
    --bg-color: #F8F3FA;
    --text-color: #29212F;
    --card-bg: #FFFFFF;
    --border-color: #DED2E4;

    --primary: #7C3AED;
    --primary-hover: #6929D1;

    --secondary: #F0E5F7;

    --shadow: rgba(70, 35, 85, 0.10);
    --input-bg: #FCFAFD;

    --error: #D04F68;
    --success: #3F8F6B;
}

body.dark {
    --bg-color: #18121D;
    --text-color: #F5EFF8;
    --card-bg: #241B2B;
    --border-color: #45364D;

    --primary: #A78BFA;
    --primary-hover: #BDA8FF;

    --secondary: #33243D;

    --shadow: rgba(0, 0, 0, 0.32);
    --input-bg: #201823;

    --error: #EF788B;
    --success: #72C49A;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: none;
}

header {
    height: 70px;
    background: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 8px var(--shadow);
}

header h1 {
    font-size: 28px;
    margin: 0;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
}

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

.icon-button {
    width: 42px;
    height: 42px;
    cursor: pointer;
    padding: 0;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-button:hover {
    background: var(--secondary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.icon-button svg {
    width: 20px;
    height: 20px;
}

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

.header-logo {
    height: 40px;
    width: auto;
    border-radius: 100%;
    border: 2px solid var(--text-color);
}

.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--secondary) 100%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px var(--shadow);
    animation: slideUp 0.4s ease;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
}

.auth-header p {
    margin: 0;
    font-size: 15px;
    opacity: 0.7;
}

.tab-container {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: var(--secondary);
    padding: 6px;
    border-radius: 12px;
}

.tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab.active {
    background: var(--input-bg);
    box-shadow: 0 2px 8px var(--shadow);
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 45px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.5;
}

.input-icon:hover { opacity: 1; }

.error-message {
    color: var(--error);
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.error-message.show { display: block; }

.forgot-password {
    text-align: right;
    margin-top: -10px;
    margin-bottom: 20px;
}

.forgot-password a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.submit-button {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    margin-top: 8px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    opacity: 0.5;
}

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

.divider span {
    padding: 0 16px;
    font-size: 14px;
}

.social-buttons {
    display: flex;
    gap: 12px;
}

.social-button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.social-button:hover {
    background: var(--secondary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.form-container { display: none; }
.form-container.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-group label {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}

.checkbox-group a { color: var(--primary); text-decoration: none; }

@media (max-width: 768px) {
    .social-buttons { flex-direction: column; }
    #custom-cursor {
        display: none !important;
    }
    body {
        cursor: default;
    }
}

#custom-cursor {
    position: fixed;
    width: 1rem; 
    height: 1rem;
    background-color: #7845c0; 
    border-radius: 9999px;
    pointer-events: none; 
    z-index: 9999;
    mix-blend-mode: difference; 
    transition: transform 0.2s ease-out, background-color 0.2s ease-out; 
    transform: translate(-50%, -50%) scale(1); 
}

#universal-toast-container {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.universal-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--card-bg, #1a1a1a);
    border: 2px solid var(--border-color, #494949);
    box-shadow: 0 8px 24px var(--shadow, rgba(0, 0, 0, 0.3));
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #f5f5f5);
    min-width: 260px;
    max-width: 380px;
    pointer-events: auto;
    animation: universalToastIn 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.universal-toast.hide {
    animation: universalToastOut 0.25s ease forwards;
}

.universal-toast.success { border-color: var(--success, #10b981); }
.universal-toast.error { border-color: var(--error, #ef4444); }
.universal-toast.warning { border-color: var(--warning, #f59e0b); }
.universal-toast.info { border-color: var(--primary, #2563eb); }

.universal-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.universal-toast.success .universal-toast-icon { background: var(--success, #10b981); }
.universal-toast.error .universal-toast-icon { background: var(--error, #ef4444); }
.universal-toast.warning .universal-toast-icon { background: var(--warning, #f59e0b); }
.universal-toast.info .universal-toast-icon { background: var(--primary, #2563eb); }

.universal-toast-icon svg {
    width: 13px;
    height: 13px;
}

.universal-toast-message {
    line-height: 1.4;
}

@keyframes universalToastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes universalToastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(30px); }
}

@media screen and (max-width: 768px) {
    #universal-toast-container {
        top: 72px;
        right: 12px;
        left: 12px;
    }

    .universal-toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}