@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

:root {
    /* Color Palette - Deep Universe */
    --bg-dark: #050505;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #8b5cf6;
    --accent: #10b981;
    
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    
    --blur: 24px;
    --radius: 20px;
    
    --font-main: 'Tajawal', sans-serif;
}

* {
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    /* Dynamic Background */
    background: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    margin-bottom: 40px;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    position: sticky;
    top: 20px;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

/* Fix for buttons inside nav */
.nav-links a.btn {
    padding: 10px 20px;
}
.nav-links a.btn::after {
    display: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px;
    position: relative;
}

.hero h1 {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 25px;
    font-weight: 900;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Feature Cards (Hybrid Glass) */
.stats-grid, .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 30px;
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
    opacity: 0.5;
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: var(--glass-highlight);
}

.card h2 {
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 700;
}

.card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Dashboard Styles */
.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.guild-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.guild-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-5px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.guild-icon {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    margin-bottom: 15px;
    background: #252529;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.guild-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Settings Forms */
.settings-container {
    max-width: 700px;
    margin: 0 auto;
}

.settings-group {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
}

.setting-row {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 18px;
}

/* Custom Inputs */
select, input[type="text"], input[type="number"], input[type="password"] {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s;
    min-width: 150px;
}

select:focus, input:focus {
    border-color: var(--primary);
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        border-radius: 0;
        top: 0;
        margin: 0 -20px 40px -20px;
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        background: rgba(5,5,5,0.9);
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 20px;
        font-size: 14px;
    }
    
    .hero h1 { font-size: 36px; }
    
    .stats-grid, .guild-grid {
        grid-template-columns: 1fr;
    }
    
    .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .setting-control {
        width: 100%;
    }
    
    select, input {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero, .card, .guild-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
