/* MEGStone main styles */
:root {
    --color-accent: #4CA3F5;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.45);

    --bg-light: #f5f7fb;
    --bg-light-card: #ffffff;
    --bg-light-header: rgba(255, 255, 255, 0.9);
    --text-light-main: #111827;
    --text-light-muted: #6b7280;

    --bg-dark: #0b1220;
    --bg-dark-card: #020617;
    --bg-dark-header: rgba(15, 23, 42, 0.9);
    --text-dark-main: #e5e7eb;
    --text-dark-muted: #9ca3af;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-dark-main);
}

body.theme-light {
    background: radial-gradient(circle at top left, #e0f2fe, #f5f7fb 40%, #e4e4f7 100%);
    color: var(--text-light-main);
}

body.theme-dark {
    background: radial-gradient(circle at top left, #0b1120, #020617 45%, #020617 100%);
    color: var(--text-dark-main);
}

.page-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 32px;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

body.theme-dark .site-header {
    background: var(--bg-dark-header);
}

body.theme-light .site-header {
    background: var(--bg-light-header);
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 10%, #e0f2fe, #4CA3F5 40%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 14px 40px rgba(37, 99, 235, 0.8);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.logo-tagline {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    opacity: 0.7;
}

.main-nav {
    display: flex;
    gap: 10px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    color: inherit;
    opacity: 0.82;
    transition: all 0.15s ease-out;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(148, 163, 184, 0.1);
}

.nav-link-active {
    background: rgba(76, 163, 245, 0.12);
    color: #4CA3F5;
    box-shadow: 0 0 0 1px rgba(76, 163, 245, 0.5);
}

.nav-link-danger {
    color: #f97373;
}

.theme-switcher {
    display: flex;
    gap: 6px;
}

.theme-chip {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: inherit;
    opacity: 0.7;
}

.theme-chip-active {
    background: #4CA3F5;
    color: white;
    opacity: 1;
    border-color: transparent;
}

.site-main {
    flex: 1;
    padding: 0;
    max-width: none;
    margin: 0;
}

/* Hero section */
.hero {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    padding: 40px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: radial-gradient(circle at 10% 0%, #0ea5e9, #0b1120 45%, #020617 100%);
    color: white;
    box-shadow: var(--shadow-soft);
}

/* Главный лендинг-блок на главной: без карточки, на всю ширину */
.hero-landing {
    border-radius: 0;
    box-shadow: none;
    padding: 80px 48px 80px;
}

.hero-admin-editor {
    max-width: 900px;
    margin: 0 auto;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 32px;
}

.hero-column-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-column-icons {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 64px);
    gap: 12px;
}

.hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: white;
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.7);
}

.hero-icon-blue { background: linear-gradient(135deg, #2563eb, #38bdf8); }
.hero-icon-purple { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.hero-icon-teal { background: linear-gradient(135deg, #0d9488, #22c55e); }
.hero-icon-pink { background: linear-gradient(135deg, #db2777, #fb7185); }
.hero-icon-amber { background: linear-gradient(135deg, #f97316, #facc15); }
.hero-icon-lime { background: linear-gradient(135deg, #4ade80, #22c55e); }
.hero-icon-sky { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.hero-icon-indigo { background: linear-gradient(135deg, #4f46e5, #6366f1); }

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: radial-gradient(circle at 10% 20%, rgba(96, 165, 250, 0.7) 0, transparent 55%),
                      radial-gradient(circle at 80% 80%, rgba(45, 212, 191, 0.6) 0, transparent 60%),
                      radial-gradient(circle at 50% 20%, rgba(129, 140, 248, 0.9) 0, transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 42px;
    margin: 0 0 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-subtitle {
    margin: 0 0 22px;
    font-size: 17px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 10;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.hero-tag {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(15, 23, 42, 0.5);
}

/* Cards */
.content-card {
    margin-top: 28px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: var(--radius-lg);
    padding: 24px 24px 22px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

body.theme-light .content-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(148, 163, 184, 0.35);
}

.card-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.card-subtitle {
    margin: 0;
    color: #9ca3af;
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease-out;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: #4CA3F5;
    color: white;
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.55);
}

.btn-primary:hover {
    background: #3693f0;
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.6);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

body.theme-light .btn-ghost {
    background: white;
    color: #111827;
}

.btn-ghost:hover {
    background: rgba(148, 163, 184, 0.1);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Lists */
.doc-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-item {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

body.theme-light .doc-item {
    background: #f9fafb;
}

.doc-item:hover {
    border-color: #4CA3F5;
}

.doc-title {
    font-size: 15px;
}

.doc-meta {
    font-size: 12px;
    color: #9ca3af;
}

.projects-grid {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}


.project-card {
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.35);
    overflow: hidden;
    display: flex !important;
    flex-direction: row-reverse !important;
    gap: 16px;
    align-items: flex-start !important;
    }

body.theme-light .project-card {
    background: white;
}

.project-image img {
    width: 100%;
    display: block;
}

.projects-list-image {
    flex-shrink: 0;
}

.projects-list-image img {
    width: 380px;
    height: 380px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(148, 163, 184, 0.3);
}

.project-body {
    padding: 16px 16px 16px 16px;
    flex: 1 !important;
}

.project-title {
    margin: 0 0 6px;
    font-size: 17px;
}

.project-links {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip-link {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    text-decoration: none;
    color: inherit;
}

.chip-link:hover {
    border-color: #4CA3F5;
    color: #4CA3F5;
}

/* Home Product Cards */
.home-product-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 0 24px;
}

.product-icon {
    flex-shrink: 0;
}

.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    position: relative;
    overflow: hidden;
}

.icon-circle::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
}

.icon-comics {
    background: linear-gradient(135deg, #4CA3F5, #2563eb);
}

.icon-games {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
}

.product-content {
    flex: 1;
}

.home-product-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #4CA3F5;
    letter-spacing: 0.02em;
}

.home-product-card p {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.9;
    font-weight: 400;
}

.product-link {
    color: #4CA3F5;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.product-link:hover {
    transform: translateX(4px);
    color: #2563eb;
}

/* Features Grid */
.home-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s ease;
}

body.theme-light .feature-item {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
}

.feature-item:hover {
    transform: translateY(-4px);
    border-color: #4CA3F5;
    box-shadow: 0 20px 40px rgba(76, 163, 245, 0.2);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.feature-create {
    background: linear-gradient(135deg, #4CA3F5, #38bdf8);
}

.feature-code {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
}

.feature-community {
    background: linear-gradient(135deg, #ec4899, #f97316);
}

.feature-text {
    flex: 1;
}

.feature-text h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: #e5e7eb;
}

body.theme-light .feature-text h3 {
    color: #111827;
}

.feature-text p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.8;
}

.feature-link {
    color: #4CA3F5;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.feature-link:hover {
    transform: translateX(4px);
    color: #2563eb;
}

/* Grid Items */
.home-grid-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.grid-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 32px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    position: relative;
    overflow: hidden;
}

body.theme-light .grid-item {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(76, 163, 245, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover::before {
    opacity: 1;
}

.grid-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #4CA3F5;
    background: rgba(76, 163, 245, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}

.grid-content {
    flex: 1;
}

.grid-content h2 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #e5e7eb;
    line-height: 1.3;
}

body.theme-light .grid-content h2 {
    color: #111827;
}

.grid-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.8;
}

/* Home Sections */
.home-section {
    padding: 48px 0 64px;
}

.home-section:first-of-type {
    padding-top: 40px;
}

.home-promo {
    padding-top: 0px !important;
}

.home-promo-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 48px;
}

/* Markdown */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin: 10px 0 4px;
}

.markdown-body p {
    margin: 4px 0 6px;
    font-size: 14px;
    line-height: 1.5;
}

.markdown-body a {
    color: #4CA3F5;
}

/* Forms */
.form-grid {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-size: 13px;
    color: #9ca3af;
}

.input,
.textarea {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.65);
    padding: 8px 10px;
    font-size: 14px;
    background: rgba(15, 23, 42, 0.85);
    color: inherit;
}

body.theme-light .input,
body.theme-light .textarea {
    background: white;
}

.input:focus,
.textarea:focus {
    outline: none;
    border-color: #4CA3F5;
    box-shadow: 0 0 0 1px rgba(76, 163, 245, 0.6);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.links-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.links-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 6px;
}

.alert {
    margin-top: 10px;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
}

.alert-error {
    background: rgba(248, 113, 113, 0.09);
    border: 1px solid rgba(248, 113, 113, 0.7);
    color: #fecaca;
}

/* Admin Dashboard */
.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 40px;
    padding: 32px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body.theme-light .admin-header-section {
    background: rgba(255, 255, 255, 0.8);
}

.admin-header-content {
    flex: 1;
}

.admin-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #4CA3F5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-subtitle {
    font-size: 16px;
    color: #9ca3af;
    margin: 0;
}

.admin-quick-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.admin-quick-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s ease;
}

body.theme-light .stat-card {
    background: rgba(255, 255, 255, 0.8);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: #4CA3F5;
    box-shadow: 0 20px 40px rgba(76, 163, 245, 0.2);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.stat-documents {
    background: linear-gradient(135deg, #4CA3F5, #38bdf8);
}

.stat-projects {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
}

.stat-visits {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.stat-users {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.stat-today {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.stat-server {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.stat-time {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-uptime {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #e5e7eb;
    margin-bottom: 4px;
}

body.theme-light .stat-number {
    color: #111827;
}

.stat-label {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

/* Content Grid */
.admin-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.content-section {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

body.theme-light .content-section {
    background: rgba(255, 255, 255, 0.8);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0;
}

body.theme-light .section-title {
    color: #111827;
}

.section-title i {
    color: #4CA3F5;
}

.content-list {
    padding: 16px;
}

.content-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

body.theme-light .content-item {
    background: rgba(249, 250, 251, 0.8);
}

.content-item:hover {
    border-color: #4CA3F5;
    transform: translateX(4px);
}

.item-info {
    flex: 1;
}

.item-title {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 4px;
}

body.theme-light .item-title {
    color: #111827;
}

.item-meta {
    font-size: 12px;
    color: #9ca3af;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.edit-btn {
    background: rgba(76, 163, 245, 0.1);
    color: #4CA3F5;
    border: 1px solid rgba(76, 163, 245, 0.2);
}

.edit-btn:hover {
    background: rgba(76, 163, 245, 0.2);
    transform: scale(1.05);
}

.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-header-section {
        flex-direction: column;
        gap: 20px;
        padding: 24px;
    }
    
    .admin-quick-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .admin-quick-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .site-header {
        flex-wrap: wrap;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 16px;
    }
    
    .main-nav.active {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .theme-switcher {
        order: 2;
    }
    
    /* Hero mobile fixes */
    .hero-landing {
        padding: 40px 24px !important;
    }
    
    .hero-inner {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        text-align: center;
    }
    
    .hero-title {
        font-size: 28px !important;
    }
    
    .hero-subtitle {
        font-size: 14px !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0 16px;
    }
    
    .hero-buttons .btn {
        width: auto;
        justify-content: center;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .hero-icons-grid {
        grid-template-columns: repeat(4, 48px) !important;
        gap: 8px !important;
    }
    
    .hero-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 9px !important;
    }
    
    /* Footer mobile fixes */
    .site-footer {
        padding: 24px 16px !important;
    }
    
    .footer-inner {
        flex-direction: column !important;
        gap: 20px !important;
        text-align: center;
    }
    
    .footer-col {
        width: 100% !important;
    }
    
    .footer-links {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 0 !important;
    }
    
    .footer-pill {
        margin-top: 16px !important;
    }
    
    .footer-social {
        justify-content: center !important;
    }
    
    /* Hide slider on mobile */
    .hero-column-icons {
        display: none !important;
    }
    
    /* Hide all hero icons completely */
    .hero-icons-grid {
        display: none !important;
    }
    
    /* Better footer mobile */
    .site-footer {
        margin-top: 40px !important;
    }
    
    .footer-title {
        font-size: 18px !important;
    }
    
    .footer-desc {
        font-size: 14px !important;
    }
    
    .footer-link-item {
        font-size: 14px !important;
    }
    
    .footer-pill {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
}

/* Admin Editor */
.admin-root {
    min-height: 100vh;
    background: var(--bg-gradient);
}

.editor-header {
    margin-bottom: 32px;
    padding: 32px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body.theme-light .editor-header {
    background: rgba(255, 255, 255, 0.8);
}

.editor-title h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #4CA3F5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.editor-title p {
    font-size: 16px;
    color: #9ca3af;
    margin: 0;
}

.form-section {
    margin-bottom: 32px;
}

.editor-label {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body.theme-light .editor-toolbar {
    background: rgba(249, 250, 251, 0.8);
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #9ca3af;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background: rgba(76, 163, 245, 0.1);
    color: #4CA3F5;
}

.toolbar-btn.active {
    background: rgba(76, 163, 245, 0.2);
    color: #4CA3F5;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(148, 163, 184, 0.3);
    margin: 0 4px;
}

.editor-container {
    position: relative;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.4);
}

body.theme-light .editor-container {
    background: rgba(255, 255, 255, 0.8);
}

.editor-textarea {
    width: 100%;
    min-height: 400px;
    padding: 20px;
    border: none;
    background: transparent;
    color: inherit;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.editor-preview {
    min-height: 400px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.preview-content {
    font-size: 15px;
    line-height: 1.6;
    color: #e5e7eb;
}

.preview-content h1,
.preview-content h2,
.preview-content h3 {
    margin: 20px 0 12px;
    font-weight: 700;
}

.preview-content h1 { font-size: 24px; }
.preview-content h2 { font-size: 20px; }
.preview-content h3 { font-size: 18px; }

.preview-content p {
    margin: 12px 0;
}

.preview-content ul,
.preview-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.preview-content li {
    margin: 4px 0;
}

.preview-content blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    background: rgba(76, 163, 245, 0.1);
    border-left: 4px solid #4CA3F5;
    border-radius: 8px;
    font-style: italic;
}

.preview-content code {
    background: rgba(76, 163, 245, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
}

.preview-content pre {
    background: rgba(15, 23, 42, 0.6);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.preview-content pre code {
    background: none;
    padding: 0;
}

.preview-content a {
    color: #4CA3F5;
    text-decoration: none;
}

.preview-content a:hover {
    text-decoration: underline;
}

.preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

.editor-form .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.editor-form .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Links management */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.links-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.links-row .input {
    flex: 1;
}

.btn-remove-link {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-remove-link:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

/* Footer */
.site-footer {
    margin-top: auto;
    padding: 48px 24px 32px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(15, 23, 42, 0.4);
}

body.theme-light .site-footer {
    background: rgba(249, 250, 251, 0.8);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 48px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-title {
    font-size: 16px;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 8px;
}

body.theme-light .footer-title {
    color: #111827;
}

.footer-desc {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.5;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(76, 163, 245, 0.1);
    border: 1px solid rgba(76, 163, 245, 0.2);
    color: #4CA3F5;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: rgba(76, 163, 245, 0.2);
    transform: translateY(-2px);
    color: #2563eb;
}

.footer-link {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #4CA3F5;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link-item {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link-item:hover {
    color: #4CA3F5;
}

.footer-pill {
    margin-top: auto;
    padding: 8px 16px;
    background: rgba(76, 163, 245, 0.1);
    border: 1px solid rgba(76, 163, 245, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: #4CA3F5;
    font-weight: 600;
    text-align: center;
}

.footer-right {
    text-align: right;
}

.empty {
    font-size: 13px;
    color: #9ca3af;
}

/* Auth */
.auth-root .site-main {
    max-width: 420px;
}

.auth-card {
    margin-top: 60px;
}

@media (max-width: 768px) {
    .site-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 14px;
    }

    .hero {
        padding: 26px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .site-main {
        padding: 20px 14px 24px;
    }

    .site-footer {
        flex-direction: column;
        text-align: left;
    }
}
