/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Core Colors */
    --bg-dark: #09090b;
    --bg-card: rgba(23, 23, 28, 0.7);
    --bg-card-hover: rgba(30, 30, 35, 0.8);

    /* Branding */
    --primary: #9d4edd;
    /* Neon Purple */
    --primary-glow: rgba(157, 78, 221, 0.5);
    --secondary: #e0aaff;
    --accent: #5865F2;
    /* Discord Blurple */

    /* Text */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;

    /* UI Elements */
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(255, 255, 255, 0.03);
    --gradient: linear-gradient(135deg, #9d4edd 0%, #3c096c 100%);

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(157, 78, 221, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(88, 101, 242, 0.1) 0%, transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    /* Professional standard cursor */
}

/* Subte Background Glow following mouse */
.mouse-glow {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.07) 0%, transparent 70%);
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

a,
button,
.sidebar-item,
.guild-card {
    cursor: pointer !important;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 35px var(--primary-glow);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Common Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 800;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
}

.logo img {
    height: 48px;
    width: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.logo span {
    background: linear-gradient(to right, #fff, #e0aaff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(157, 78, 221, 0.4);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text-main);
    border: 1px solid var(--border);
}

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

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

/* Invisible bridge to keep the menu open while moving the mouse through the gap */
.lang-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    z-index: 1;
}

.lang-btn {
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.flag-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.lang-content {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-width: 160px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease-out;
}

.lang-dropdown:hover .lang-content {
    display: block;
}

.lang-content a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.lang-content a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    padding-left: 1.4rem;
}

.lang-content a:hover .flag-icon {
    transform: scale(1.1);
}

.lang-content a .flag-icon {
    transition: transform 0.2s ease;
}

.lang-content a.active {
    color: var(--primary);
    background: rgba(157, 78, 221, 0.05);
}

.avatar {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 4rem;
}

.hero-content {
    animation: fadeIn 0.8s ease-out;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(157, 78, 221, 0.2);
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-stats {
    display: flex;
    gap: 4rem;
    justify-content: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
}

.stat-item p {
    font-size: 1rem;
    margin: 0;
}

/* Dashboard Grid */
.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.guild-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.guild-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.guild-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.guild-card:hover::before {
    transform: translateX(100%);
}

.guild-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    border: 3px solid var(--border);
    background: #000;
    display: grid;
    place-items: center;
    font-size: 2rem;
    transition: 0.3s;
}

.guild-card:hover .guild-icon {
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
}

.guild-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Management Layout */
.manage-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
    font-weight: 500;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.content-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    min-height: 600px;
    animation: fadeIn 0.4s ease-out;
}

.panel-header {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border);
    padding: 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 1rem;
    transition: 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(157, 78, 221, 0.1);
}

.form-textarea {
    min-height: 120px;
    font-family: 'Consolas', monospace;
    line-height: 1.5;
    resize: vertical;
}

/* Settings Specific Enhancements */
.settings-section {
    margin-bottom: 3rem;
    animation: fadeIn 0.4s ease-out;
}

.settings-group-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.settings-grid .form-group {
    margin-bottom: 0.5rem;
}

.form-group-full {
    grid-column: span 2;
}

.input-helper {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    display: block;
}

.preview-box {
    margin-top: 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
    position: relative;
    max-height: 300px;
    /* Limit height to prevent huge previews */
}

.preview-box img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    /* Don't stretch if small, but fit if large */
    display: block;
}

.preview-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--secondary);
    backdrop-filter: blur(4px);
    z-index: 2;
    border: 1px solid var(--border);
}

.category-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    padding: 1.5rem;
}

.category-card:hover {
    border-color: var(--primary);
    background: rgba(157, 78, 221, 0.03);
}

.form-input {
    overflow: hidden;
    text-overflow: ellipsis;
}

.save-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.95);
    border-top: 1px solid var(--primary);
    padding: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.save-bar.visible {
    transform: translateY(0);
}

/* Utilities */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pro {
    background: var(--gradient);
    color: white;
}

/* Landing Page Specific */
.introduction {
    padding: 6rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    justify-content: center;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 3rem;
    border-radius: var(--radius-lg);
    text-align: left;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feature-card i {
    font-size: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.command-section {
    padding: 6rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin: 4rem 0;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.command-name {
    font-family: 'Consolas', monospace;
    color: var(--primary);
    background: rgba(157, 78, 221, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.powered-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    background: var(--glass);
    border: 1px solid var(--primary);
    border-radius: 100px;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-main);
    box-shadow: 0 0 20px var(--primary-glow);
}

.powered-badge i {
    color: var(--primary);
}

.early-access-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--secondary);
    border-radius: 100px;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(224, 170, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

.early-access-badge i {
    color: var(--secondary);
}