* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea, [contenteditable] {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

button, a, .btn, .nav-link, .logo, .theme-toggle {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
}

:root {
    --bg-primary: #0a0b0d;
    --bg-secondary: #1a1b23;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #7c3aed;
    --accent-hover: #8b5cf6;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(0, 0, 0, 0.05);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent: #7c3aed;
    --accent-hover: #8b5cf6;
    --border: rgba(0, 0, 0, 0.1);
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    backdrop-filter: blur(20px);
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
    transform: translateY(-2px);
}

.theme-toggle {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle .icon {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: opacity, transform;
}

.theme-toggle .sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

.theme-toggle .moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

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

.hero {
    background: radial-gradient(circle at 20% 50%, var(--accent) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, #ec4899 0%, transparent 50%),
                var(--bg-primary);
    flex-direction: row;
    padding: 0;
    gap: 0;
}

.hero-mascot {
    flex: 1;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-mascot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-mascot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem;
    text-align: left;
    max-width: none;
    position: relative;
    z-index: 2;
    height: 100vh;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow);
}

.info-section {
    background: var(--bg-secondary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
}

.info-card {
    background: var(--bg-glass);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow);
}

.online-section {
    background: linear-gradient(45deg, var(--bg-primary), var(--bg-secondary));
}

.user-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1200px;
    width: 100%;
    justify-content: flex-start;
}

.user-tile {
    background: var(--bg-glass);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
    flex: 1 1 calc(25% - 0.75rem);
    max-width: calc(25% - 0.75rem);
}

.user-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-glass);
    background: #10b981;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-activity {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-online { background: #10b981; }
.status-idle { background: #f59e0b; }
.status-dnd { background: #ef4444; }
.status-offline { background: #6b7280; }

.roles-section {
    background: var(--bg-primary);
}

.roles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1200px;
    width: 100%;
    justify-content: flex-start;
}

.role-tile {
    background: var(--bg-glass);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    flex: 1 1 calc(33.333% - 0.67rem);
    max-width: calc(33.333% - 0.67rem);
    min-width: 280px;
}

.role-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow);
}

.role-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.role-color {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}

.role-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.role-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.role-members {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    background: var(--bg-glass);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.stats-section {
    background: var(--bg-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
}

.chart-container {
    background: var(--bg-glass);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    position: relative;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}


.footer {
    background: var(--bg-primary);
    padding: 2rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}


.footer-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.footer-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
    .user-tile {
        flex: 1 1 calc(33.333% - 0.67rem);
        max-width: calc(33.333% - 0.67rem);
    }
    
    .role-tile {
        flex: 1 1 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        flex-direction: column;
        position: relative;
    }
    
    .hero-mascot {
        height: 60vh;
        order: 1;
    }
    
    .hero-mascot::after {
        background: linear-gradient(180deg, transparent 0%, var(--bg-primary) 80%);
    }
    
    .hero-content {
        order: 2;
        padding: 2rem;
        text-align: center;
        align-items: center;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(transparent, var(--bg-primary) 30%);
        z-index: 3;
        height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
        text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    }
    
    .hero-subtitle {
        text-shadow: 0 1px 5px rgba(0,0,0,0.5);
    }
    
    .buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 300px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        padding: 1.5rem;
    }
    
    .user-tile {
        flex: 1 1 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
        min-width: 180px;
    }
    
    .role-tile {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .user-tile {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: auto;
    }
}
