@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
    /* Discord Core Colors */
    --blurple: #5865F2;
    --blurple-dark: #4752C4;
    --blurple-light: #7289DA;
    --green: #57F287;
    --yellow: #FEE75C;
    --fuchsia: #EB459E;
    --red: #ED4245;
    
    /* Discord Dark Theme */
    --bg-primary: #313338;
    --bg-secondary: #2B2D31;
    --bg-tertiary: #1E1F22;
    --bg-floating: #232428;
    --bg-mod-subtle: rgba(79, 84, 92, 0.16);
    --bg-mod-strong: rgba(79, 84, 92, 0.48);
    
    /* Text Colors */
    --text-normal: #DBDEE1;
    --text-muted: #949BA4;
    --text-link: #00A8FC;
    --text-positive: #23A55A;
    --text-warning: #F0B232;
    --text-danger: #F23F43;
    
    /* Borders & Dividers */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);
    --divider: rgba(255, 255, 255, 0.08);
    
    /* Shadows */
    --elevation-low: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1.5px 0 rgba(0, 0, 0, 0.05), 0 2px 0 rgba(0, 0, 0, 0.05);
    --elevation-medium: 0 4px 4px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.06);
    --elevation-high: 0 8px 16px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(0, 0, 0, 0.06);
    
    /* Misc */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg-tertiary);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-normal);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === ANIMATED BACKGROUND === */
.gradient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    will-change: transform, opacity;
}

.orb-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--blurple) 0%, transparent 70%);
    top: -300px;
    left: -200px;
    animation: float-1 20s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--fuchsia) 0%, transparent 70%);
    top: 50%;
    right: -150px;
    animation: float-2 25s ease-in-out infinite;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--blurple-light) 0%, transparent 70%);
    bottom: -100px;
    left: 40%;
    animation: float-3 18s ease-in-out infinite;
}

@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, 30px) scale(1.05); }
    66% { transform: translate(-30px, 50px) scale(0.95); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    50% { transform: translate(-70px, -50px) scale(1.1); opacity: 0.5; }
}

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, -40px) scale(1.08); }
}

/* Noise overlay for texture */
.grid-pattern {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* === LAYOUT === */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.container {
    width: 100%;
    max-width: 460px;
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === BRAND === */
.brand {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--blurple), var(--fuchsia));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 32px rgba(88, 101, 242, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    animation: icon-glow 3s ease-in-out infinite alternate;
}

@keyframes icon-glow {
    from { box-shadow: 0 8px 32px rgba(88, 101, 242, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) inset; }
    to { box-shadow: 0 8px 48px rgba(88, 101, 242, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15) inset; }
}

.brand-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

.brand h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--text-normal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand p {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* === CARD === */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--elevation-high);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blurple), var(--fuchsia), var(--blurple));
    background-size: 200% 100%;
    animation: gradient-shift 4s linear infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* === FORM ELEMENTS === */
.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-group .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    pointer-events: none;
    transition: stroke 0.2s ease;
}

.input-field {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-normal);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

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

.input-field:hover {
    border-color: var(--border-strong);
}

.input-field:focus {
    border-color: var(--blurple);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.input-field:focus + .icon,
.input-group:focus-within .icon {
    stroke: var(--blurple);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.btn-primary {
    width: 100%;
    background: var(--blurple);
    color: white;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.35);
}

.btn-primary:hover {
    background: var(--blurple-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.45);
}

.btn-primary:hover svg {
    transform: translateX(3px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.35);
}

/* Ripple effect */
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s ease;
}

.btn-primary:active::after {
    opacity: 1;
    transform: scale(2.5);
    transition: 0s;
}

.btn-secondary {
    background: var(--bg-mod-subtle);
    color: var(--text-normal);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--bg-mod-strong);
    border-color: var(--border-strong);
}

/* === STATUS === */
.status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--divider);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.status-dot {
    position: relative;
    width: 10px;
    height: 10px;
}

.status-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--green);
    animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-dot::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: var(--green);
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}

/* === NAVIGATION === */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blurple);
    border-radius: 1px;
    transition: width 0.2s ease;
}

.nav-link:hover {
    color: var(--text-normal);
}

.nav-link:hover::after {
    width: 100%;
}

/* === SETTINGS PAGE === */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-left: -12px;
}

.back-link:hover {
    color: var(--text-normal);
    background: var(--bg-mod-subtle);
}

.back-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    letter-spacing: -0.01em;
}

.settings-section {
    margin-bottom: 1.75rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.option-btn {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.option-btn:hover {
    background: var(--bg-mod-subtle);
    color: var(--text-normal);
    border-color: var(--border-strong);
}

.option-btn.active {
    background: rgba(88, 101, 242, 0.15);
    border-color: var(--blurple);
    color: white;
    box-shadow: 0 0 0 1px var(--blurple) inset;
}

/* === RESPONSIVE === */
@media (max-width: 540px) {
    .brand h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .brand-icon {
        width: 64px;
        height: 64px;
    }
    
    .brand-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .option-grid {
        grid-template-columns: 1fr;
    }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-mod-strong);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* === SELECTION === */
::selection {
    background: rgba(88, 101, 242, 0.4);
    color: white;
}

/* === FOCUS VISIBLE === */
:focus-visible {
    outline: 2px solid var(--blurple);
    outline-offset: 2px;
}

/* === UTILITY CLASSES === */
.hidden {
    display: none !important;
}

/* === LOADING STATES === */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading {
    background: linear-gradient(90deg, 
        var(--bg-tertiary) 0%,
        var(--bg-mod-subtle) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
