/* ============================================================
   Chotto.app - Common Styles
   Light/Dark theme, Responsive, Minimalist Design
   ============================================================ */

/* ===== CSS Variables / Theme ===== */
:root {
    /* Dark theme (default) */
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-tertiary: #1a1a3a;
    --bg-card: #16163a;
    --bg-card-hover: #1c1c4a;
    --bg-input: #1a1a3a;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0c0;
    --text-muted: #6a6a8a;
    --accent: #6c63ff;
    --accent-hover: #7b73ff;
    --accent-secondary: #00d4aa;
    --danger: #ff4757;
    --danger-hover: #ff6b7a;
    --success: #2ed573;
    --warning: #ffa502;
    --border-color: #2a2a4a;
    --border-light: #1e1e3a;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --font-mono: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s ease;
    --nav-height: 64px;
    --max-width: 1200px;
}

/* Light theme */
[data-theme="light"] {
    --bg-primary: #f8f9fe;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f8;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f2f8;
    --bg-input: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-muted: #8a8aaa;
    --border-color: #dde0ea;
    --border-light: #e8eaf2;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

.center {
    text-align: center;
}

/* ===== Header / Navigation ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.85);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo:hover {
    color: var(--accent);
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-primary-nav {
    background: var(--accent);
    color: white !important;
    border-radius: var(--radius-sm);
}

.btn-primary-nav:hover {
    background: var(--accent-hover);
}

.btn-logout {
    color: var(--danger) !important;
}

.btn-logout:hover {
    background: rgba(255, 71, 87, 0.1);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.sun-icon, .moon-icon {
    display: none;
}

[data-theme="dark"] .moon-icon,
[data-theme="light"] .sun-icon {
    display: block;
}

/* Language Switcher */
.lang-switcher {
    margin-left: 0.25rem;
}

.lang-form {
    display: inline;
}

.lang-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-top: var(--nav-height);
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 4rem 1.5rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(108, 99, 255, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 50%, rgba(0, 212, 170, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===== Floating Cubes Animation ===== */
.hero-visual {
    position: relative;
    height: 400px;
}

.floating-cubes {
    position: absolute;
    inset: 0;
    perspective: 800px;
}

.cube {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    opacity: 0.8;
    animation: float 6s ease-in-out infinite;
}

.cube-1 {
    top: 10%;
    left: 20%;
    background: var(--accent);
    animation-delay: 0s;
    width: 80px;
    height: 80px;
}

.cube-2 {
    top: 40%;
    left: 60%;
    background: var(--accent-secondary);
    animation-delay: 1s;
    width: 50px;
    height: 50px;
}

.cube-3 {
    top: 60%;
    left: 10%;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    animation-delay: 2s;
    width: 70px;
    height: 70px;
}

.cube-4 {
    top: 20%;
    right: 10%;
    background: var(--accent);
    animation-delay: 0.5s;
    width: 45px;
    height: 45px;
}

.cube-5 {
    bottom: 20%;
    right: 30%;
    background: var(--accent-secondary);
    animation-delay: 1.5s;
    width: 55px;
    height: 55px;
}

.cube-6 {
    top: 50%;
    left: 40%;
    background: rgba(108, 99, 255, 0.5);
    animation-delay: 3s;
    width: 35px;
    height: 35px;
}

.cube-7 {
    bottom: 10%;
    left: 50%;
    background: rgba(0, 212, 170, 0.5);
    animation-delay: 2.5s;
    width: 65px;
    height: 65px;
}

.cube-8 {
    top: 5%;
    right: 35%;
    background: linear-gradient(135deg, var(--accent), transparent);
    animation-delay: 3.5s;
    width: 40px;
    height: 40px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-30px) rotate(90deg) scale(1.05);
    }
    50% {
        transform: translateY(-10px) rotate(180deg) scale(0.95);
    }
    75% {
        transform: translateY(-40px) rotate(270deg) scale(1.02);
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: var(--bg-tertiary);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger);
}

.btn-danger.noborder {
    border: none;
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: transparent;
    color: var(--success);
    border-color: var(--success);
}

.btn-success:hover {
    background: var(--success);
    color: white;
}

.btn-disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-color: var(--border-color);
    cursor: default;
    pointer-events: none;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* ===== Section Styles ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    margin: 0.75rem auto 0;
    border-radius: 3px;
}

/* ===== Recent Apps Section ===== */
.recent-apps-section {
    padding: 5rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.apps-scroll-container {
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.apps-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.apps-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.apps-scroll-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.apps-scroll {
    display: flex;
    gap: 1rem;
    min-width: min-content;
    padding: 0.5rem;
}

.app-link, .app-link:visited {
    color: var(--text-primary);
}

.app-card {
    flex-shrink: 0;
    width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
    color: var(--text-primary);
}

.app-card-preview {
    height: 120px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.app-card-info {
    padding: 1rem;
}

.app-card-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-card-author {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.app-card-visits {
    display: block;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
}

.no-apps-message {
    padding: 2rem;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
}

/* ===== Plans Section ===== */
.plans-section {
    padding: 5rem 1.5rem;
    background: var(--bg-secondary);
}

.plans-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.plan-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(108, 99, 255, 0.1);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.plan-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
}

.period {
    font-size: 1rem;
    color: var(--text-muted);
}

.plan-body {
    flex: 1;
    margin-bottom: 2rem;
}

.plan-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.plan-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

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

.plan-footer .btn {
    width: 100%;
}

/* ===== Auth Pages ===== */
.auth-container {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

/* ===== Form Styles ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

textarea.icon-editor {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 60px;
}

textarea.code-editor {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
}

textarea.code-viewer {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 480px;
}

.app-name-input {
    display: flex;
    align-items: center;
    gap: 0;
}

.app-name-prefix {
    padding: 0.75rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.app-name-input input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.app-name-static {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ===== Alert Styles ===== */
.alert {
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-error {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.2);
    color: var(--danger);
}

.alert-success {
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.2);
    color: var(--success);
}

.alert-message {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    text-align: center;
    border: 1px solid var(--success);
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ===== Auth Links ===== */
.auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--text-muted);
}

.auth-links a:hover {
    color: var(--accent);
}

/* ===== Profile / User Index ===== */
.profile-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

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

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.profile-info p {
    color: var(--text-secondary);
}

.create-app-btn {
    flex-shrink: 0;
}

/* ===== Apps Grid ===== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.app-card-detailed {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: var(--transition);
}

.app-card-detailed:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.app-card-icon-large {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.app-card-body {
    flex: 1;
    min-width: 0;
}

.app-card-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.app-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.app-url {
    font-size: 0.8rem;
    color: var(--accent);
    font-family: var(--font-mono);
}

.app-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.inline-form {
    display: inline;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* ===== Editor Page ===== */
.editor-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.editor-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.editor-header-actions {
    display: flex;
    gap: 0.5rem;
}

.editor-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

/* ===== Dashboard ===== */
.dashboard-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

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

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.users-icon {
    background: rgba(108, 99, 255, 0.1);
    color: var(--accent);
}

.apps-icon {
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-secondary);
}

.stat-card-info {
    display: flex;
    flex-direction: column;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.dashboard-section {
    margin-bottom: 2.5rem;
}

.dashboard-section h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

/* ===== Tables ===== */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table thead {
    background: var(--bg-tertiary);
}

.data-table th {
    padding: 0.9rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg-card-hover);
}

.data-table .user-link {
    font-weight: 600;
}

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

.text-muted {
    color: var(--text-muted);
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
}

.badge-user {
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent-secondary);
}

.badge-active {
    background: rgba(46, 213, 115, 0.15);
    color: var(--success);
}

.badge-banned {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.footer-brand-text {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
/*    padding-top: 1.5rem;*/
/*    border-top: 1px solid var(--border-color);*/
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        height: 300px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .profile-header {
        flex-wrap: wrap;
    }

    .create-app-btn {
        width: 100%;
    }

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

@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .hero-visual {
        height: 250px;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .editor-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-card-detailed {
        flex-direction: column;
        text-align: center;
    }

    .app-card-actions {
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

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

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.7rem;
    }

    .hero-visual {
        height: 200px;
    }

    .cube {
        width: 40px !important;
        height: 40px !important;
    }

    .plans-grid {
        max-width: 100%;
    }
}

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

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
