/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Typography & Colors */
:root {
    --primary-color: #5865F2;
    --secondary-color: #7289DA;
    --accent-color: #5865F2;
    --text-dark: #333333;
    --text-body: #666666;
    --text-light: #ffffff;
    --text-muted: rgba(0, 0, 0, 0.6);
    --bg-white: #ffffff;
    --bg-light-gray: #f8f9fa;
    --bg-overlay: rgba(88, 101, 242, 0.05);
    --bg-overlay-hover: rgba(88, 101, 242, 0.1);
    --border-light: rgba(0, 0, 0, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --gradient-card: linear-gradient(45deg, #5865F2, #7289DA);
}

/* Body & Background */
html {
    background: var(--bg-white);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-white);
    color: var(--text-body);
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: 100px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation - Shared across pages */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 15px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow-light);
}

/* Compact Navigation for Dashboard Pages */
nav.compact-nav {
    padding: 8px 0;
}

nav.compact-nav .logo {
    font-size: 20px;
}

nav.compact-nav .logo::before {
    font-size: 22px;
    margin-right: 6px;
}

nav.compact-nav .nav-links {
    gap: 20px;
}

nav.compact-nav .nav-links a {
    padding: 6px 10px;
    font-size: 0.9rem;
}

nav.compact-nav .login-btn {
    padding: 8px 18px;
    font-size: 0.9rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo::before {
    content: '🤖';
    margin-right: 8px;
    font-size: 28px;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    background: var(--bg-overlay);
}

.nav-links a.active {
    background: var(--bg-overlay-hover);
    color: var(--primary-color);
}

/* Login Button */
.login-btn {
    background: linear-gradient(45deg, #5865F2, #7289DA);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
    cursor: pointer;
    border: none;
    position: relative;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.6);
}

.discord-icon {
    width: 20px;
    height: 20px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    background: var(--bg-overlay);
    color: var(--text-light);
    border: 1px solid var(--border-light);
}

.btn:hover {
    background: var(--bg-overlay-hover);
    transform: translateY(-2px);
}

.btn.primary {
    background: var(--gradient-card);
    border: none;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}

.btn.primary:hover {
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.6);
}

/* Loading Animations */
.loading {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--text-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 15px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow-light);
}

.card:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px var(--shadow-medium);
}

/* Headers */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 80px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-body);
}

/* Back Button */
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-btn:hover {
    background: var(--bg-overlay-hover);
    transform: translateY(-2px);
}

/* Status Messages */
.status {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.status.show {
    opacity: 1;
    transform: translateY(0);
}

.status.success {
    background: #28a745;
    color: white;
}

.status.error {
    background: #dc3545;
    color: white;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background: var(--bg-overlay);
    color: var(--text-light);
    font-size: 14px;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* User Menu Dropdown */
.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(88, 101, 242, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 10px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.user-menu .user-info {
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
}

.user-menu .user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
}

.user-menu .user-stats {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.user-menu a {
    display: block;
    padding: 10px 12px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.user-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-menu .logout-btn {
    color: #ff6b6b;
}

/* Notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 500;
    z-index: 1002;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 250px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.info {
    background: linear-gradient(45deg, #5865F2, #7289DA);
    color: white;
}

.notification.success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.notification.error {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-content {
        justify-content: space-between;
    }

    .login-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

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

    .back-btn {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 20px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { opacity: 0.8; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }