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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

/* Container and layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 16px;
}

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

/* Skeleton loading placeholders */
.loading-placeholder {
    display: flex;
    align-items: center;
    gap: 20px;
}

.skeleton-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 100%);
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-text {
    flex: 1;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 100%);
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Error messages */
.error-message {
    background: #dc3545;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #c82333;
}

.error {
    color: #dc3545;
    font-style: italic;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #99aab5;
}

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

    header h1 {
        font-size: 2rem;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

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

    .user-info {
        flex-direction: column;
        text-align: center;
    }

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

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

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

    .feature-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .discord-login-btn {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .user-card, .stat-card, .activity-list {
        padding: 16px;
    }

    .avatar {
        width: 60px;
        height: 60px;
    }

    .skeleton-avatar {
        width: 60px;
        height: 60px;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

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

.text-muted {
    color: #99aab5;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }: 40px;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #7289da, #99aab5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    color: #99aab5;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Login section */
.login-section {
    text-align: center;
}

.discord-login-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #7289da;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(114, 137, 218, 0.3);
}

.discord-login-btn:hover {
    background: #5b6eae;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 137, 218, 0.4);
}

.discord-login-btn svg {
    width: 24px;
    height: 24px;
}

.login-help {
    margin-top: 12px;
    color: #99aab5;
    font-size: 0.9rem;
}

/* Features grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 900px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #7289da;
}

.feature-card p {
    color: #99aab5;
}

/* Dashboard styles */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #7289da, #99aab5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sign-out-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.sign-out-btn:hover {
    background: #c82333;
}

/* User card */
.user-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #7289da;
    object-fit: cover;
}

.user-details h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #ffffff;
}

.user-details p {
    margin: 4px 0;
    color: #99aab5;
}

.user-details strong {
    color: #7289da;
}

/* Stats section */
.stats-section {
    margin-bottom: 30px;
}

.stats-section h2 {
    margin-bottom: 20px;
    color: #ffffff;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-card h3 {
    color: #99aab5;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.stat-change {
    font-size: 0.8rem;
    color: #28a745;
}

/* Actions section */
.actions-section {
    margin-bottom: 30px;
}

.actions-section h2 {
    margin-bottom: 20px;
    color: #ffffff;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: left;
}

.action-btn.primary {
    background: #7289da;
    color: white;
}

.action-btn.primary:hover {
    background: #5b6eae;
    transform: translateY(-2px);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.action-btn span {
    font-size: 1.2rem;
}

/* Activity section */
.activity-section h2 {
    margin-bottom: 20px;
    color: #ffffff;
}

.activity-list {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(114, 137, 218, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-content p {
    color: #ffffff;
    margin-bottom: 4px;
}

.activity-time {
    color: #99aab5 !important;
    font-size: 0.8rem;
}

/* Loading states */
.loading, .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading.hidden, .loading-overlay.hidden {
    display: none;
}