/* ================================================
   CmdPanel - Public Page Styles
   ================================================ */

/* ============== هیرو ============== */
.hero {
    padding: 60px 32px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 800px; height: 400px;
    background: radial-gradient(ellipse, rgba(94, 234, 212, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(94, 234, 212, 0.08);
    border: 1px solid rgba(94, 234, 212, 0.2);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-primary);
    margin-bottom: 20px;
    position: relative;
    letter-spacing: 0.05em;
}

.hero-eyebrow::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-glow);
    box-shadow: 0 0 8px var(--accent-glow);
    animation: pulse 2s infinite;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}

.hero h1 .accent {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-warm) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    color: var(--text-secondary);
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============== شبکه کتگوری ============== */
.categories-section {
    padding: 32px;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-default);
}

.section-title {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '◆';
    color: var(--accent-primary);
    font-size: 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(94, 234, 212, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.category-card:hover {
    border-color: var(--accent-deep);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(94, 234, 212, 0.1);
}

.category-card:hover::before { opacity: 1; }

.category-card .cat-number {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.category-card .cat-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.15), rgba(13, 148, 136, 0.1));
    border: 1px solid rgba(94, 234, 212, 0.2);
    border-radius: 14px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    color: var(--accent-primary);
    transition: all 0.3s;
}

.category-card:hover .cat-icon {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-deep));
    color: var(--bg-base);
    transform: rotate(-5deg);
}

.category-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.category-card .cat-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px dashed var(--border-default);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.category-card .cat-arrow {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: grid;
    place-items: center;
    color: var(--text-muted);
    transition: all 0.3s;
}

.category-card:hover .cat-arrow {
    background: var(--accent-primary);
    color: var(--bg-base);
    transform: translateX(-4px);
}

/* ============== صفحه دستورات ============== */
.cmd-page-header {
    padding: 40px 32px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, rgba(94, 234, 212, 0.03) 0%, transparent 100%);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb .separator { color: var(--text-dim); }

.cmd-page-header h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.cmd-page-header .desc {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 700px;
}

/* ============== لیست کامند ============== */
.commands-list {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;
}

.command-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: all 0.2s;
    animation: fadeIn 0.4s var(--ease-out) both;
}

.command-item:hover { border-color: var(--border-default); }

.command-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
}

.command-index {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    min-width: 36px;
    letter-spacing: 0.05em;
}

.command-text {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    direction: ltr;
    text-align: left;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    line-height: 1.5;
}

.command-text::-webkit-scrollbar { height: 4px; }

.command-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.action-btn.btn-copy.copied {
    background: rgba(74, 222, 128, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

.action-btn.btn-info {
    background: rgba(94, 234, 212, 0.08);
    border-color: rgba(94, 234, 212, 0.25);
    color: var(--accent-primary);
}

.action-btn.btn-info:hover {
    background: rgba(94, 234, 212, 0.15);
    border-color: var(--accent-primary);
}

.action-btn.btn-file {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
    color: var(--accent-warm);
}

.action-btn.btn-file:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: var(--accent-warm);
}

@media (max-width: 768px) {
    .command-row { flex-wrap: wrap; }
    .command-text { width: 100%; order: 2; }
    .command-actions { order: 3; width: 100%; justify-content: flex-end; }
    .hero h1 { font-size: 30px; }
}

/* ============== مودال ============== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 16, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 18px;
    max-width: 640px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.3s var(--ease-bounce);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(94, 234, 212, 0.04), transparent);
}

.modal-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-icon { color: var(--accent-primary); }

.modal-close {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-cmd-preview {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-primary);
    background: var(--bg-base);
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 18px;
    direction: ltr;
    text-align: left;
    word-break: break-all;
}

.modal-description {
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.modal-description.empty {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 30px 0;
}

/* ============== فوتر ============== */
.site-footer {
    padding: 32px;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 60px;
}

.site-footer .heart { color: var(--accent-warm); }

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 64px; height: 64px;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    display: grid;
    place-items: center;
    color: var(--text-dim);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ============== صفحه لاگین کاربر ============== */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(94, 234, 212, 0.12) 0%, transparent 60%);
    top: -200px; right: -200px;
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 60%);
    bottom: -200px; left: -200px;
    pointer-events: none;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 28px;
    max-width: 1100px;
    width: 100%;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 20px;
    padding: 44px 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s var(--ease-out);
    align-self: center;
}

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand .logo-icon {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    border-radius: 16px;
}

.auth-brand .logo-icon::before { font-size: 22px; }

.auth-brand h1 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.auth-brand p {
    color: var(--text-muted);
    font-size: 13px;
    font-family: var(--font-mono);
}

/* ============== ترمینال عاشقانه ============== */
.rom-terminal {
    background: #0a0e15;
    border: 1px solid #1f2937;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.6s var(--ease-out) 0.1s both;
    min-height: 480px;
}

.rom-terminal-bar {
    background: #1a2030;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #1f2937;
}

.rom-terminal-bar .dot {
    width: 12px; height: 12px;
    border-radius: 50%;
}

.rom-terminal-bar .dot-1 { background: #ff5f56; }
.rom-terminal-bar .dot-2 { background: #ffbd2e; }
.rom-terminal-bar .dot-3 { background: #27c93f; }

.rom-terminal-bar .title {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #6b7689;
    letter-spacing: 0.05em;
    direction: ltr;
}

.rom-terminal-screen {
    flex: 1;
    padding: 18px 20px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    direction: ltr;
    text-align: left;
    color: #c8d3e0;
    background:
        linear-gradient(rgba(94, 234, 212, 0.015) 50%, transparent 50%),
        linear-gradient(90deg, transparent 0, rgba(94, 234, 212, 0.01) 100%),
        #0a0e15;
    background-size: 100% 4px, 100% 100%, 100% 100%;
}

.rom-line {
    margin-bottom: 4px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.rom-prompt {
    color: #5eead4;
    font-weight: 600;
    user-select: none;
}

.rom-cmd {
    color: #e8ecf4;
}

.rom-cursor {
    display: inline-block;
    color: #5eead4;
    animation: blink 1s step-end infinite;
    margin-right: 1px;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.rom-output {
    color: #94a3b8;
    margin-bottom: 14px;
    white-space: pre-wrap;
    font-size: 12px;
    line-height: 1.6;
    padding: 4px 0;
    animation: slideIn 0.3s var(--ease-out);
}

.rom-output-big {
    font-size: 64px !important;
    text-align: center;
    padding: 16px 0;
    animation: heartPulse 1.4s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 24px rgba(248, 113, 113, 0.6)); }
}

.rom-terminal-screen::-webkit-scrollbar { width: 6px; }
.rom-terminal-screen::-webkit-scrollbar-thumb { background: #2a3447; border-radius: 3px; }

@media (max-width: 900px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }
    .rom-terminal { min-height: 320px; }
}
