:root {
    --bg-dark: #050208;
    --glass-bg: rgba(20, 10, 30, 0.4);
    --glass-border: rgba(157, 78, 221, 0.3);
    --primary: #9d4edd;
    --primary-hover: #7b2cbf;
    --success: #00f0b5;
    --failed: #ff2a6d;
    --warning: #ffa500;
    --discord: #5865F2;
    --text-main: #ffffff;
    --text-muted: #8b8b9e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Prevent blob overflow scrollbars */
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation: float 20s infinite ease-in-out;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: #5a189a;
    bottom: -150px;
    right: -150px;
    animation: float 25s infinite reverse ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(50px, 50px);
    }
}

/* Layout */
.app-layout {
    display: flex;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    gap: 30px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo-area {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logo-area h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-area span {
    color: var(--primary);
    font-weight: 600;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.nav-links li a:hover,
.nav-links li.active a {
    background: rgba(157, 78, 221, 0.1);
    color: white;
}

.nav-links li.active a {
    border-right: 3px solid var(--primary);
}

.nav-links .icon {
    font-size: 1.2rem;
}

.badge-mini {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 6px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #5a189a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .name {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-info .status {
    font-size: 0.75rem;
    color: var(--success);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    height: 100%;
    min-width: 0;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    flex-shrink: 0;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    background: linear-gradient(90deg, #fff, var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: -1px;
}

header p {
    color: var(--text-muted);
    margin: 5px 0 0 0;
}

/* Checker Interface */
.checker-interface {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    gap: 1.5rem;
}

.input-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.input-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

textarea {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    color: var(--text-main);
    font-family: 'Outfit', monospace;
    resize: none;
    transition: all 0.3s ease;
    outline: none;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.2);
}

.action-bar {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #5a189a);
    color: white;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(157, 78, 221, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.progress-bar-container {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--success);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--success);
}

/* Results Area */
.results-area {
    display: flex;
    gap: 20px;
    flex-grow: 1;
    min-height: 0;
    /* Important for scroll */
}

.result-column {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.column-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-download {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.column-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.badge.success {
    background: rgba(0, 240, 181, 0.15);
    color: var(--success);
}

.badge.failed {
    background: rgba(255, 42, 109, 0.15);
    color: var(--failed);
}

.column-header .success {
    color: var(--success);
}

.column-header .failed {
    color: var(--failed);
}

.result-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Scrollbar */
.result-list::-webkit-scrollbar {
    width: 6px;
}

.result-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.result-list::-webkit-scrollbar-track {
    background: transparent;
}

.result-item {
    font-size: 0.85rem;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    word-break: break-all;
    animation: slideIn 0.3s ease forwards;
    display: flex;
    align-items: center;
}

.result-item.success {
    border-left: 3px solid var(--success);
}

.result-item.failed {
    border-left: 3px solid var(--failed);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    pointer-events: none;
    opacity: 0;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    height: auto;
    text-align: center;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.8);
}

.modal-content h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--primary);
}

.modal-content p {
    color: var(--text-muted);
    margin: 20px 0 30px;
}

/* Responsive */
@media (max-width: 1024px) {
    .app-layout {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        gap: 0;
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        border-radius: 0;
        border-bottom: 1px solid var(--glass-border);
        border-right: none;
    }

    .logo-area {
        margin-bottom: 0;
        margin-right: 2rem;
    }

    .nav-links {
        flex-direction: row;
        gap: 5px;
        overflow-x: auto;
    }

    .nav-links li a {
        padding: 8px 12px;
    }

    .user-profile {
        display: none;
    }

    .main-content {
        padding: 1rem;
        height: calc(100vh - 80px);
        /* Approx sidebar height */
    }

    .glass-panel {
        border-radius: 16px;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links span:not(.icon) {
        display: none;
    }

    /* Show only icons on mobile nav */
    .results-area {
        flex-direction: column;
    }

    .result-column {
        height: 50%;
    }
}

/* Discord Modal Styles */
.discord-modal {
    max-width: 500px;
    padding: 3rem 2rem;
}

.discord-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--discord), #4752C4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.4);
}

.discord-icon.warning {
    background: linear-gradient(135deg, var(--warning), #ff8c00);
    box-shadow: 0 8px 24px rgba(255, 165, 0, 0.4);
}

.discord-modal h2 {
    margin: 0 0 1rem 0;
    font-size: 1.8rem;
    color: var(--text-main);
}

.discord-modal p {
    color: var(--text-muted);
    margin: 0 0 2rem 0;
    font-size: 1rem;
}

.btn-discord {
    background: linear-gradient(135deg, var(--discord), #4752C4);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.btn-discord:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
}

.btn-discord i {
    font-size: 1.2rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-actions .btn-secondary {
    padding: 12px 24px;
}

/* Logout Button */
.btn-logout {
    background: rgba(255, 42, 109, 0.1);
    border: 1px solid rgba(255, 42, 109, 0.3);
    color: var(--failed);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
}

.btn-logout:hover {
    background: rgba(255, 42, 109, 0.2);
    transform: scale(1.05);
}

.btn-logout i {
    font-size: 0.9rem;
}

/* Fix background-clip lint warning */
header h1 {
    background-clip: text;
    -webkit-background-clip: text;
}

/* Queue Modal Styles */
.queue-modal {
    max-width: 500px;
    padding: 3rem 2rem;
}

.queue-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--warning), #ff8c00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 8px 24px rgba(255, 165, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(255, 165, 0, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(255, 165, 0, 0.6);
    }
}

.queue-modal h2 {
    margin: 0 0 1rem 0;
    font-size: 1.8rem;
    color: var(--text-main);
}

.queue-modal p {
    color: var(--text-muted);
    margin: 0 0 2rem 0;
    font-size: 1rem;
}

.queue-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.queue-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--warning);
    text-shadow: 0 0 20px rgba(255, 165, 0, 0.5);
}

.queue-divider {
    font-size: 2rem;
    color: var(--text-muted);
    opacity: 0.5;
}

#refresh-queue-btn {
    width: 100%;
    margin-top: 1rem;
}