/* === RESET & VARIABLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --bg-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    --accent-primary: #5865f2;
    --accent-hover: #4752c4;
    --accent-glow: rgba(88, 101, 242, 0.3);
    --success: #3ba55d;
    --warning: #faa81a;
    --danger: #ed4245;
    --border-color: #2f2f2f;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === WATERMARKS === */
.watermark-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
}

.watermark {
    position: absolute;
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.watermark:nth-child(1) {
    top: 10%;
    left: 10%;
    animation: float 20s infinite ease-in-out;
}

.watermark:nth-child(2) {
    top: 50%;
    right: 15%;
    animation: float 25s infinite ease-in-out reverse;
}

.watermark:nth-child(3) {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    animation: float 30s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* === LOGIN PAGE === */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #0f0f0f 100%);
    padding: 20px;
}

.login-container {
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.6s ease-out;
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 40px var(--accent-glow); }
    50% { box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 80px var(--accent-glow); }
}

.logo-section {
    text-align: center;
    margin-bottom: 32px;
}

.main-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px var(--accent-glow));
}

.logo-section h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), #7289da);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.discord-logo-section {
    display: flex;
    justify-content: center;
    margin: 32px 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.discord-login-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.discord-login-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.discord-login-btn:active {
    transform: translateY(0);
}

.login-info {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

/* === DASHBOARD LAYOUT === */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--accent-primary);
    color: white;
}

.nav-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* === USER PROFILE SIDEBAR === */
.user-profile-sidebar {
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-glow);
}

.user-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.search-bar {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    pointer-events: none;
}

.content-area {
    padding: 32px;
}

/* === STATS CARDS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), #7289da);
    transform: scaleX(0);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
}

/* === USER CARD === */
.user-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

.user-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--accent-primary), #7289da);
    position: relative;
}

.user-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 6px solid var(--bg-secondary);
    position: absolute;
    bottom: -50px;
    left: 32px;
    box-shadow: var(--shadow-md);
}

.user-info-section {
    padding: 64px 32px 32px;
}

.user-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.user-tag {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 16px;
}

.user-pronouns {
    display: inline-block;
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.user-bio {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.user-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.role-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* === MOD ACTIONS === */
.mod-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 24px;
    background: var(--bg-tertiary);
    border-radius: 0 0 16px 16px;
}

.mod-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mod-btn-timeout {
    background: var(--warning);
    color: white;
}

.mod-btn-kick {
    background: #f26522;
    color: white;
}

.mod-btn-ban {
    background: var(--danger);
    color: white;
}

.mod-btn-warn {
    background: #43b581;
    color: white;
}

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

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    margin-bottom: 24px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-description {
    color: var(--text-muted);
    font-size: 14px;
}

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

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* === LOADING SKELETON === */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === SEARCH RESULTS === */
.search-results {
    margin-top: 24px;
}

.search-result-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
    border-color: var(--accent-primary);
}

.search-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.search-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.search-meta {
    color: var(--text-muted);
    font-size: 13px;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Login Page Mobile */
    .login-card {
        padding: 32px 24px;
    }
    
    .logo-section h1 {
        font-size: 24px;
    }
    
    .discord-logo-section svg {
        width: 80px;
        height: 80px;
    }
    
    /* Sidebar Mobile - Hide by default */
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-title {
        font-size: 16px;
    }
    
    .user-profile-sidebar {
        padding: 16px;
    }
    
    /* Main Content Mobile */
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        padding: 12px 16px;
    }
    
    .search-bar {
        max-width: 100%;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .content-area h1 {
        font-size: 24px !important;
    }
    
    /* Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    /* User Card Mobile */
    .user-banner {
        height: 80px;
    }
    
    .user-avatar-large {
        width: 80px;
        height: 80px;
        left: 16px;
        bottom: -40px;
    }
    
    .user-info-section {
        padding: 52px 16px 16px;
    }
    
    .user-name {
        font-size: 20px;
    }
    
    /* Mod Actions Mobile */
    .mod-actions {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    
    /* Modal Mobile */
    .modal-content {
        padding: 24px 16px;
        margin: 20px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    /* Search Results Mobile */
    .search-result-item {
        padding: 12px;
    }
    
    .search-avatar {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    /* Very Small Screens */
    .login-card {
        padding: 24px 16px;
    }
    
    .main-logo {
        width: 60px;
        height: 60px;
    }
    
    .logo-section h1 {
        font-size: 20px;
    }
    
    .discord-logo-section svg {
        width: 60px;
        height: 60px;
    }
    
    .discord-login-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .watermark {
        width: 100px;
        height: 100px;
    }
}