* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a14;
    color: #e4e4e7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

#particles,
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#cursor-trail {
    z-index: 1;
}

.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    padding: 40px;
}

.login-box {
    background: rgba(17, 17, 27, 0.7);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: 24px;
    padding: 60px 80px;
    box-shadow:
        0 0 60px rgba(124, 58, 237, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5);
}

.header {
    text-align: center;
    margin-bottom: 48px;
}

.icon {
    display: inline-flex;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.3));
}

.header h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 16px;
    color: #9ca3af;
    font-weight: 400;
}

.auth-section {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: start;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #d4d4d8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

label svg {
    opacity: 0.6;
}

input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
    color: #e4e4e7;
    font-size: 15px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border-color: #a78bfa;
    background: rgba(30, 30, 46, 0.8);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.1);
}

input::placeholder {
    color: #52525b;
}

.btn-main {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    color: white;
}

.btn-main:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.4);
}

.btn-main:active:not(:disabled) {
    transform: translateY(0);
}

.btn-main:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, transparent, rgba(167, 139, 250, 0.3), transparent);
}

.divider::before {
    top: 0;
}

.divider::after {
    bottom: 0;
}

.divider span {
    background: rgba(17, 17, 27, 0.8);
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #71717a;
    letter-spacing: 1px;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.features-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-card {
    background: rgba(30, 30, 46, 0.4);
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    background: rgba(30, 30, 46, 0.6);
    border-color: rgba(167, 139, 250, 0.3);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(124, 58, 237, 0.2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a78bfa;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 13px;
    color: #71717a;
}

.footer {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(167, 139, 250, 0.1);
    text-align: center;
}

.footer p {
    font-size: 13px;
    color: #9ca3af;
}

.footer a {
    color: #a78bfa;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #c4b5fd;
}

.notif {
    position: fixed;
    top: 32px;
    right: 32px;
    background: rgba(17, 17, 27, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
    padding: 16px 24px;
    color: #e4e4e7;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notif.show {
    opacity: 1;
    transform: translateX(0);
}

.notif.error {
    border-left: 4px solid #ef4444;
}

@media (max-width: 900px) {
    .login-box {
        padding: 40px 32px;
    }

    .auth-section {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .divider {
        flex-direction: row;
        padding: 0 20px;
    }

    .divider::before,
    .divider::after {
        width: 60px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.3), transparent);
    }

    .divider::before {
        left: 0;
        top: 50%;
    }

    .divider::after {
        right: 0;
        top: 50%;
    }
}

/* ==================== MODAL STYLES ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 580px;
    max-height: 85vh;
    background: linear-gradient(165deg, rgba(20, 20, 32, 0.95) 0%, rgba(12, 12, 20, 0.98) 100%);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 24px;
    box-shadow:
        0 0 80px rgba(124, 58, 237, 0.15),
        0 25px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px 20px;
    border-bottom: 1px solid rgba(167, 139, 250, 0.1);
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.08) 0%, transparent 100%);
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(167, 139, 250, 0.1);
    border-radius: 10px;
    color: #a78bfa;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(167, 139, 250, 0.2);
    color: #c4b5fd;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px 32px;
    max-height: 55vh;
    overflow-y: auto;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(30, 30, 46, 0.5);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.3);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 139, 250, 0.5);
}

.info-section {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(30, 30, 46, 0.4);
    border: 1px solid rgba(167, 139, 250, 0.1);
    border-radius: 16px;
    transition: all 0.3s;
}

.info-section:hover {
    background: rgba(30, 30, 46, 0.6);
    border-color: rgba(167, 139, 250, 0.2);
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-section p {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 14px;
}

.info-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-section li {
    font-size: 13px;
    color: #a1a1aa;
    padding: 8px 0 8px 24px;
    position: relative;
    line-height: 1.5;
    border-bottom: 1px solid rgba(167, 139, 250, 0.05);
}

.info-section li:last-child {
    border-bottom: none;
}

.info-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.4);
}

.info-section li strong {
    color: #c4b5fd;
    font-weight: 600;
}

.info-section.warning {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(30, 30, 46, 0.4));
    border-color: rgba(239, 68, 68, 0.2);
}

.info-section.warning h3 {
    color: #fca5a5;
}

.info-section.warning li::before {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.modal-footer {
    padding: 20px 32px 28px;
    border-top: 1px solid rgba(167, 139, 250, 0.1);
    display: flex;
    justify-content: center;
}

.btn-close {
    padding: 14px 48px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    color: white;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.btn-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.btn-close:active {
    transform: translateY(0);
}

/* Server Requirement Notice */
.server-requirement {
    margin-top: 16px;
}

.server-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 12px;
    color: #8b9dff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.server-link:hover {
    background: rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.5);
    color: #a8b4ff;
    transform: translateY(-2px);
}

.server-link svg {
    flex-shrink: 0;
}

.server-link .arrow-icon {
    opacity: 0.7;
    transition: transform 0.2s;
}

.server-link:hover .arrow-icon {
    transform: translateX(4px);
    opacity: 1;
}