/* ============================================
   LinoBot - Main Stylesheet
   Modern Dark Theme with Glassmorphism
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(26, 26, 37, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;

    --accent-primary: #5865F2;
    --accent-secondary: #7289da;
    --accent-gradient: linear-gradient(135deg, #5865F2 0%, #7289da 50%, #9b59b6 100%);
    --accent-glow: rgba(88, 101, 242, 0.4);

    --success: #43b581;
    --warning: #faa61a;
    --danger: #f04747;

    --border-color: rgba(255, 255, 255, 0.1);
    --border-radius: 16px;
    --border-radius-sm: 8px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px var(--accent-glow);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   Animated Background
   ============================================ */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.stars,
.stars2,
.stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.stars {
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200px 200px;
    animation: starsMove 100s linear infinite;
}

.stars2 {
    background-image:
        radial-gradient(1px 1px at 50px 80px, rgba(88, 101, 242, 0.5), transparent),
        radial-gradient(2px 2px at 100px 20px, rgba(114, 137, 218, 0.4), transparent),
        radial-gradient(1px 1px at 150px 100px, rgba(155, 89, 182, 0.5), transparent);
    background-size: 250px 250px;
    animation: starsMove 80s linear infinite reverse;
}

.stars3 {
    background-image:
        radial-gradient(3px 3px at 70px 50px, rgba(88, 101, 242, 0.2), transparent),
        radial-gradient(2px 2px at 120px 140px, rgba(114, 137, 218, 0.15), transparent);
    background-size: 300px 300px;
    animation: starsMove 120s linear infinite;
}

@keyframes starsMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-100%);
    }
}

/* ============================================
   Typography & Utilities
   ============================================ */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-logo i {
    color: var(--accent-primary);
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-btn {
    background: var(--accent-gradient) !important;
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-glow);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px var(--accent-glow);
}

.nav-mobile {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
}

.hero-badge i {
    color: var(--warning);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 60px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.bot-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 320px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.bot-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: white;
    box-shadow: var(--shadow-glow);
    overflow: hidden;
}

.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bot-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.bot-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success);
    font-size: 0.875rem;
}

.bot-status i {
    font-size: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.bot-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.feature-tag {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.feature-tag i {
    margin-right: 0.25rem;
    color: var(--accent-primary);
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Stats Section
   ============================================ */
.stats-section {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-title {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Commands Section
   ============================================ */
.commands-section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.command-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.command-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
}

.command-name {
    font-family: 'Fira Code', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.command-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.command-category {
    display: inline-block;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    padding: 8rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 3rem 2rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-brand i {
    color: var(--accent-primary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   Dashboard Styles
   ============================================ */
.dashboard {
    padding-top: 80px;
    min-height: 100vh;
}

.dashboard-header {
    padding: 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.dashboard-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--text-secondary);
}

.dashboard-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.dashboard-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.dashboard-card .value {
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-card.accent {
    background: var(--accent-gradient);
}

.dashboard-card.accent h3 {
    color: rgba(255, 255, 255, 0.8);
}

.servers-list {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.servers-list-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.servers-list-header h2 {
    font-size: 1.25rem;
}

.server-item {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.server-item:last-child {
    border-bottom: none;
}

.server-item:hover {
    background: var(--bg-glass);
}

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    overflow: hidden;
}

.server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.server-info {
    flex: 1;
}

.server-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.server-members {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.server-action {
    padding: 0.5rem 1rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.server-action:hover {
    background: var(--accent-secondary);
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-description {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    /* Dashboard sidebar tablet */
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .sidebar-logo {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .sidebar-nav li {
        margin-bottom: 0;
    }

    .sidebar-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .nav-container {
        position: relative;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: -1rem;
        right: -1rem;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        border-bottom: 1px solid var(--border-color);
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 0.75rem 1rem;
        border-radius: var(--border-radius-sm);
    }

    .nav-links a:hover {
        background: var(--bg-glass);
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }

    .nav-mobile {
        display: block;
    }

    .nav-logo span {
        font-size: 1.25rem;
    }

    .hero {
        padding: 5rem 1rem 2rem;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }

    .bot-card {
        width: 100%;
        max-width: 280px;
        padding: 1.5rem;
    }

    .bot-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    /* Features mobile */
    .features {
        padding: 3rem 1rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    /* Stats section mobile */
    .stats-section {
        padding: 3rem 1rem;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-card i {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    /* Commands mobile */
    .commands-section {
        padding: 3rem 1rem;
    }

    .commands-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .command-card {
        padding: 1rem;
    }

    /* CTA mobile */
    .cta-section {
        padding: 4rem 1rem;
    }

    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    /* Footer mobile */
    .footer {
        padding: 2rem 1rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    /* Dashboard mobile */
    .page-header h1 {
        font-size: 1.5rem;
    }

    .config-card {
        padding: 1rem;
    }

    .config-card h2 {
        font-size: 1.1rem;
    }

    .toggle-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .form-group select,
    .form-group input[type="text"],
    .form-group textarea {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .btn-save {
        width: 100%;
        justify-content: center;
    }

    /* Server cards mobile */
    .server-grid {
        grid-template-columns: 1fr;
    }

    .server-card {
        padding: 1rem;
    }

    .server-card-icon {
        width: 48px;
        height: 48px;
    }

    /* Dashboard stats mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-box {
        padding: 1rem;
    }

    .stat-box .value {
        font-size: 1.5rem;
    }

    .stat-box h3 {
        font-size: 0.7rem;
    }

    /* Sidebar mobile */
    .sidebar-server {
        padding: 0.75rem;
    }

    .sidebar-server-icon {
        width: 40px;
        height: 40px;
    }

    .sidebar-server-info h3 {
        font-size: 0.9rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.875rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .stat-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }

    .stat-card i {
        margin-bottom: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-nav {
        flex-direction: column;
    }

    .sidebar-nav a {
        width: 100%;
    }

    /* Login mobile */
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-avatar {
        width: 80px;
        height: 80px;
    }

    .login-icon {
        font-size: 3rem;
    }

    .discord-login-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {

    .nav-links a,
    .sidebar-nav a,
    .btn,
    .server-card,
    .feature-card,
    .command-card {
        min-height: 44px;
    }

    .toggle-switch {
        width: 56px;
        height: 30px;
    }

    .toggle-slider:before {
        height: 24px;
        width: 24px;
    }

    .toggle-switch input:checked+.toggle-slider:before {
        transform: translateX(26px);
    }
}

/* Dark mode forced for OLED screens */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
    }
}