:root {
    --primary-color: #6d28d9;
    --primary-light: #8b5cf6;
    --primary-dark: #5b21b6;
    --secondary-color: #ec4899;
    --secondary-light: #f472b6;
    --accent-color: #10b981;
    --dark-bg: #111827;
    --darker-bg: #0f172a;
    --light-bg: #1e293b;
    --lighter-bg: #334155;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --transition-speed: 0.3s;
    --border-radius: 10px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-light);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

.app-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(to bottom, var(--darker-bg), var(--dark-bg));
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.8s ease;
}

.auth-header {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 1.5rem;
    color: var(--primary-light);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary-light), var(--secondary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-speed) ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--primary-light);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--primary-light), var(--secondary-light));
}

.auth-forms {
    position: relative;
    min-height: 400px;
}

.auth-form {
    padding: 2rem;
    display: none;
    animation: fadeIn 0.5s ease;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--primary-light), var(--secondary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-form p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-with-icon input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition-speed) ease;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.input-with-icon input::placeholder {
    color: var(--text-muted);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.remember-me,
.terms {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input,
.terms input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-light);
}

.forgot-password {
    color: var(--text-muted);
    transition: all var(--transition-speed) ease;
}

.forgot-password:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 0.85rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.auth-btn:hover::before {
    opacity: 1;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.auth-btn i {
    transition: transform var(--transition-speed) ease;
}

.auth-btn:hover i {
    transform: translateX(3px);
}

.danger-btn {
    background: linear-gradient(to right, #ef4444, #b91c1c);
}

.danger-btn::before {
    background: linear-gradient(to right, #b91c1c, #ef4444);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.auth-divider span {
    padding: 0 1rem;
}

.switch-form-btn {
    width: 100%;
    padding: 0.85rem;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.switch-form-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light);
}

.api-key-container {
    display: flex;
    margin-bottom: 1.5rem;
    position: relative;
}

.api-key {
    flex: 1;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-family: monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: nowrap;
}

.copy-btn {
    padding: 0 1rem;
    background-color: var(--primary-dark);
    color: white;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: all var(--transition-speed) ease;
}

.copy-btn:hover {
    background-color: var(--primary-color);
}

.usage-stats {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.usage-stats h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--primary-light);
}

.stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    font-weight: 600;
}

.auth-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.deku-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-speed) ease;
}

.deku-link i {
    font-size: 1.25rem;
    color: var(--primary-light);
    filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.5));
    transition: all var(--transition-speed) ease;
}

.animated-name {
    display: flex;
}

.animated-name span {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
}

.deku-link:hover i {
    transform: scale(1.2) rotate(15deg);
    color: var(--secondary-light);
}

.deku-link:hover .animated-name span {
    color: var(--primary-light);
}

.deku-link:hover .animated-name span:nth-child(1) {
    transform: translateY(-5px) rotate(5deg);
    transition-delay: 0s;
}

.deku-link:hover .animated-name span:nth-child(2) {
    transform: translateY(-8px) rotate(-5deg);
    transition-delay: 0.05s;
}

.deku-link:hover .animated-name span:nth-child(3) {
    transform: translateY(-5px) rotate(5deg);
    transition-delay: 0.1s;
}

.deku-link:hover .animated-name span:nth-child(4) {
    transform: translateY(-8px) rotate(-5deg);
    transition-delay: 0.15s;
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.notification {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    background-color: var(--dark-bg);
    color: var(--text-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    animation: shrink 3s linear forwards;
}

.notification.success::before {
    background-color: var(--success-color);
}

.notification.error::before {
    background-color: var(--error-color);
}

.notification.warning::before {
    background-color: var(--warning-color);
}

.notification-icon {
    font-size: 1.25rem;
}

.notification.success .notification-icon {
    color: var(--success-color);
}

.notification.error .notification-icon {
    color: var(--error-color);
}

.notification.warning .notification-icon {
    color: var(--warning-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.notification-close {
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-speed) ease;
}

.notification-close:hover {
    color: var(--text-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes shrink {
    from {
        width: 100%;
    }

    to {
        width: 0;
    }
}

#particle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(125deg, rgba(109, 40, 217, 0.05) 0%, rgba(236, 72, 153, 0.05) 50%, rgba(16, 185, 129, 0.05) 100%);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    z-index: -2;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 600px) {
    .app-container {
        padding: 1rem;
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-form {
        padding: 1.5rem;
    }

    .form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .notification {
        min-width: auto;
        max-width: 90%;
    }
}