/* ══════════════════════════════════════════════════════════════
   AutoRooster Community — Modern Design System (2026)
   Glassmorphism + Bento Grid + Modern Forms
   ══════════════════════════════════════════════════════════════ */

/* ── Hero Sections ── */
.cm-hero {
    border-radius: 20px; padding: 32px; margin-bottom: 24px;
    position: relative; overflow: hidden;
}
.cm-hero::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.cm-hero h1 {
    font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: -0.02em;
    margin: 0 0 6px; display: flex; align-items: center; gap: 10px;
}
.cm-hero p { font-size: 0.88rem; color: rgba(255,255,255,0.6); margin: 0 0 20px; }
.cm-hero-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 12px; border: none;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
    color: #fff; font-weight: 700; font-size: 0.88rem; cursor: pointer;
    transition: all 0.2s; font-family: inherit; text-decoration: none;
}
.cm-hero-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); }

/* Hero color variants */
.cm-hero-purple  { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%); }
.cm-hero-orange  { background: linear-gradient(135deg, #7c2d12 0%, #c2410c 50%, #ea580c 100%); }
.cm-hero-blue    { background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 50%, #0284c7 100%); }
.cm-hero-green   { background: linear-gradient(135deg, #14532d 0%, #166534 50%, #15803d 100%); }
.cm-hero-rose    { background: linear-gradient(135deg, #4c0519 0%, #9f1239 50%, #e11d48 100%); }
.cm-hero-slate   { background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%); }
.cm-hero-amber   { background: linear-gradient(135deg, #78350f 0%, #92400e 50%, #b45309 100%); }
.cm-hero-teal    { background: linear-gradient(135deg, #042f2e 0%, #115e59 50%, #0f766e 100%); }

/* ── Glass Cards ── */
.cm-glass {
    background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.06); border-radius: 20px;
    padding: 24px; margin-bottom: 20px;
    box-shadow: 0 4px 24px -4px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.cm-glass:hover { box-shadow: 0 12px 32px -8px rgba(0,0,0,0.1); }
.cm-glass-title {
    font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #6366f1; margin: 0 0 16px;
    display: flex; align-items: center; gap: 8px;
}
.cm-glass-title i { font-size: 1.1rem; }

/* ── Modern Form Fields ── */
.cm-modern-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.cm-modern-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .cm-modern-row, .cm-modern-row-2 { grid-template-columns: 1fr; } }

.cm-modern-field { position: relative; margin-bottom: 12px; }
.cm-modern-field label {
    display: block; font-size: 0.7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: #94a3b8; margin-bottom: 6px;
}
.cm-modern-field select,
.cm-modern-field input,
.cm-modern-field textarea {
    width: 100%; padding: 12px 14px; border-radius: 12px;
    border: 1.5px solid rgba(0,0,0,0.08); background: rgba(0,0,0,0.02);
    font-size: 0.88rem; font-family: inherit; color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none; appearance: none;
}
.cm-modern-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
    padding-right: 36px; cursor: pointer;
}
.cm-modern-field select:focus,
.cm-modern-field input:focus,
.cm-modern-field textarea:focus {
    outline: none; border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12); background: #fff;
}

/* ── Variant / Item Cards ── */
.cm-variant-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.cm-variant-card {
    padding: 14px 16px; border-radius: 14px;
    border: 1.5px solid rgba(0,0,0,0.06); background: #fff;
    cursor: pointer; transition: all 0.2s;
}
.cm-variant-card:hover { border-color: #6366f1; background: #f5f3ff; transform: translateX(4px); }
.cm-variant-name { font-weight: 700; font-size: 0.88rem; color: #1e293b; }
.cm-variant-meta {
    font-size: 0.75rem; color: #64748b; margin-top: 3px;
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.cm-pill {
    display: inline-flex; padding: 2px 8px; border-radius: 6px;
    background: rgba(99,102,241,0.08); color: #4f46e5;
    font-weight: 600; font-size: 0.72rem;
}
.cm-pill-green { background: rgba(16,185,129,0.1); color: #059669; }
.cm-pill-orange { background: rgba(249,115,22,0.1); color: #c2410c; }
.cm-pill-rose { background: rgba(244,63,94,0.1); color: #be123c; }

/* ── Bento Grid ── */
.cm-bento {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.cm-bento-card {
    background: #fff; border: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px; padding: 22px; overflow: hidden;
    transition: transform 0.2s, box-shadow 0.25s;
    text-decoration: none; color: inherit; display: block;
}
.cm-bento-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -8px rgba(0,0,0,0.1); }
.cm-bento-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: 14px;
}
.cm-bento-title { font-weight: 700; font-size: 0.95rem; color: #1e293b; margin-bottom: 4px; }
.cm-bento-desc { font-size: 0.8rem; color: #94a3b8; line-height: 1.5; }
.cm-bento-stat {
    margin-top: 12px; padding-top: 12px; border-top: 1px solid #f1f5f9;
    font-size: 0.78rem; color: #64748b; display: flex; align-items: center; gap: 6px;
}
.cm-bento-stat strong { color: #1e293b; font-weight: 700; }

/* ── Feed / Post Cards ── */
.cm-post {
    background: #fff; border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px; padding: 20px; margin-bottom: 12px;
    transition: all 0.2s;
}
.cm-post:hover { border-color: rgba(99,102,241,0.15); }
.cm-post-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.cm-post-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; font-weight: 700; font-size: 0.82rem;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cm-post-user { font-weight: 600; font-size: 0.88rem; color: #1e293b; }
.cm-post-time { font-size: 0.72rem; color: #94a3b8; }
.cm-post-car {
    display: inline-flex; padding: 3px 10px; border-radius: 8px;
    background: #f1f5f9; font-size: 0.78rem; font-weight: 600; color: #475569;
    margin-bottom: 10px;
}
.cm-post-body { font-size: 0.88rem; color: #334155; line-height: 1.6; }
.cm-post-actions {
    display: flex; gap: 16px; margin-top: 14px; padding-top: 12px;
    border-top: 1px solid #f8fafc;
}
.cm-post-action {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.78rem; color: #94a3b8; cursor: pointer;
    border: none; background: none; font-family: inherit;
    padding: 4px 8px; border-radius: 6px; transition: all 0.15s;
}
.cm-post-action:hover { background: #f1f5f9; color: #6366f1; }

/* ── Leaderboard Items ── */
.cm-lb-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.04); background: #fff;
    margin-bottom: 8px; transition: all 0.2s;
}
.cm-lb-item:hover { transform: translateX(4px); border-color: rgba(99,102,241,0.2); }
.cm-lb-rank {
    width: 32px; height: 32px; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; font-weight: 800; font-size: 0.82rem;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cm-lb-rank.gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.cm-lb-rank.silver { background: linear-gradient(135deg, #94a3b8, #64748b); }
.cm-lb-rank.bronze { background: linear-gradient(135deg, #d97706, #92400e); }

/* ── Section Title ── */
.cm-section-title {
    font-size: 1rem; font-weight: 800; color: #1e293b;
    margin: 28px 0 14px; letter-spacing: -0.01em;
    display: flex; align-items: center; gap: 8px;
}
.cm-section-title i { color: #6366f1; }

/* ── Modern Modal ── */
.cm-modern-modal {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.cm-modern-modal.open { display: flex; }
.cm-modern-modal-card {
    background: #fff; border-radius: 20px; padding: 32px;
    width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 25px 60px -12px rgba(0,0,0,0.25);
    animation: cmModalSlide 0.25s ease;
}
@keyframes cmModalSlide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.cm-modern-modal-card h2 { font-size: 1.2rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em; }
.cm-modern-modal-card .modal-sub { font-size: 0.82rem; color: #94a3b8; margin-bottom: 20px; }

/* ── Modern Buttons ── */
.cm-btn-modern {
    padding: 12px 24px; border-radius: 12px; font-weight: 700;
    font-size: 0.85rem; border: none; cursor: pointer; font-family: inherit;
    transition: all 0.15s; display: inline-flex; align-items: center; gap: 8px;
}
.cm-btn-modern:active { transform: scale(0.97); }
.cm-btn-indigo { background: #6366f1; color: #fff; }
.cm-btn-indigo:hover { background: #4f46e5; box-shadow: 0 4px 16px rgba(99,102,241,0.3); }
.cm-btn-ghost-modern { background: #f1f5f9; color: #64748b; }
.cm-btn-ghost-modern:hover { background: #e2e8f0; }

/* ── Empty State ── */
.cm-modern-empty {
    text-align: center; padding: 40px 20px; color: #94a3b8;
}
.cm-modern-empty i { font-size: 2.5rem; margin-bottom: 12px; display: block; opacity: 0.4; }
.cm-modern-empty h3 { font-size: 1rem; font-weight: 700; color: #64748b; margin: 0 0 4px; }
.cm-modern-empty p { font-size: 0.85rem; }

/* ── Stats Bar ── */
.cm-stats-bar {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.cm-stat-card {
    background: #fff; border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px; padding: 16px; text-align: center;
}
.cm-stat-val { font-size: 1.5rem; font-weight: 800; color: #1e293b; letter-spacing: -0.02em; }
.cm-stat-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; margin-top: 2px; }

/* ── Tier Badge ── */
.cm-tier {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 8px; font-size: 0.72rem; font-weight: 700;
}
.cm-tier-egg { background: #f8fafc; color: #94a3b8; }
.cm-tier-bronze { background: rgba(180,83,9,0.1); color: #92400e; }
.cm-tier-silver { background: rgba(100,116,139,0.1); color: #475569; }
.cm-tier-gold { background: rgba(245,158,11,0.1); color: #b45309; }
.cm-tier-platinum { background: rgba(99,102,241,0.1); color: #4f46e5; }

/* ── XP Progress Bar ── */
.cm-xp-bar {
    height: 6px; border-radius: 3px; background: #f1f5f9;
    overflow: hidden; margin: 8px 0;
}
.cm-xp-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.5s ease;
}
