@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   Liara-Inspired Design System (DataSave)
   Deep dark + Vibrant green-teal accents
   ======================================== */

:root {
    /* Liara-style green-teal palette */
    --primary: #1ce68b;
    --primary-light: #5dfbb1;
    --primary-dark: #0fa968;
    --secondary: #00b4d8;
    --bg-deep: #0c0e14;
    --bg-surface: #121620;
    --bg-card: rgba(18, 22, 36, 0.85);
    --bg-card-hover: rgba(28, 34, 56, 0.9);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-active: rgba(28, 230, 139, 0.3);
    --text-primary: #f0f2f5;
    --text-secondary: #8b95a8;
    --text-muted: #5a6478;
    --accent-gradient: linear-gradient(135deg, #1ce68b 0%, #00b4d8 100%);
    --accent-gradient-hover: linear-gradient(135deg, #5dfbb1 0%, #26c6e0 100%);
    --glow-green: rgba(28, 230, 139, 0.15);
    --glow-blue: rgba(0, 180, 216, 0.12);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-btn: 0 4px 20px rgba(28, 230, 139, 0.25);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --radius-full: 50px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Background Ambient Effects (Liara-style)
   ======================================== */
.glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
}

.glow-sphere:nth-child(1) {
    top: -15%;
    right: -5%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--glow-green) 0%, transparent 70%);
    filter: blur(80px);
    animation: floatGlow 12s ease-in-out infinite alternate;
}

.glow-sphere:nth-child(2) {
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--glow-blue) 0%, transparent 70%);
    filter: blur(100px);
    animation: floatGlow 15s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    50% { transform: translate(30px, -20px) scale(1.05); opacity: 0.9; }
    100% { transform: translate(-20px, 30px) scale(0.95); opacity: 0.7; }
}

/* ========================================
   Navigation (Liara-style sticky nav)
   ======================================== */
nav {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(12, 14, 20, 0.75);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo-container:hover { opacity: 0.85; }

.logo-img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 0 8px var(--glow-green));
    transition: filter 0.3s;
}

.logo-container:hover .logo-img {
    filter: drop-shadow(0 0 16px var(--glow-green));
}

.logo-text {
    font-weight: 700;
    letter-spacing: 1.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ========================================
   Hero Section (Liara-style bold hero)
   ======================================== */
.hero {
    padding: 5rem 0 3rem;
    text-align: center;
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.hero h1 .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(28, 230, 139, 0.08);
    border: 1px solid rgba(28, 230, 139, 0.2);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Card Component (Glassmorphism)
   ======================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-card), 0 0 40px var(--glow-green);
}

.card h3, .card h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

/* ========================================
   Feature Cards Grid (Liara-style)
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 3rem 0 4rem;
}

.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.35s;
}

.feature-card:hover {
    border-color: var(--border-active);
    transform: translateY(-6px);
    box-shadow: var(--shadow-card), 0 0 30px var(--glow-green);
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 1.2rem;
    background: rgba(28, 230, 139, 0.08);
    border: 1px solid rgba(28, 230, 139, 0.15);
}

.feature-card h4 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   Form Inputs (Liara-style clean inputs)
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

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

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(18, 22, 36, 1);
    box-shadow: 0 0 0 3px rgba(28, 230, 139, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* ========================================
   Buttons (Liara-style CTA)
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    text-align: center;
    text-decoration: none;
    background: var(--accent-gradient);
    color: #0c0e14;
    font-size: 1rem;
    font-family: inherit;
    box-shadow: var(--shadow-btn);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(28, 230, 139, 0.35);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-secondary::before { display: none; }

.btn-danger {
    background: linear-gradient(135deg, #ff4d6a, #ff1744);
    box-shadow: 0 4px 20px rgba(255, 23, 68, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 8px 32px rgba(255, 23, 68, 0.4);
}

/* ========================================
   Alert / Message Box
   ======================================== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.alert-success {
    border-color: rgba(28, 230, 139, 0.3);
    background: rgba(28, 230, 139, 0.06);
    color: var(--primary);
}

.alert-error {
    border-color: rgba(255, 77, 106, 0.3);
    background: rgba(255, 77, 106, 0.06);
    color: #ff4d6a;
}

/* ========================================
   Table / Share List (Admin Dashboard)
   ======================================== */
.share-list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.share-list thead th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border-subtle);
}

.share-list tbody tr {
    transition: background 0.2s;
}

.share-list tbody td {
    padding: 1.2rem 1rem;
    background: var(--bg-surface);
    border-bottom: none;
    font-size: 0.9rem;
}

.share-list tbody td:first-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.share-list tbody td:last-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }

.share-list tbody tr:hover td {
    background: var(--bg-card-hover);
}

/* ========================================
   Status Badges
   ======================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.status-active {
    color: var(--primary);
    background: rgba(28, 230, 139, 0.08);
    border: 1px solid rgba(28, 230, 139, 0.2);
}

.status-active:hover {
    background: rgba(28, 230, 139, 0.15);
}

.status-expired {
    color: #ff4d6a;
    background: rgba(255, 77, 106, 0.08);
    border: 1px solid rgba(255, 77, 106, 0.2);
}

/* ========================================
   Code / Master Key Display
   ======================================== */
.master-key-display {
    background: rgba(28, 230, 139, 0.06);
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 2px;
    border: 1px solid rgba(28, 230, 139, 0.15);
}

/* ========================================
   Content Viewer (Secure Content Display)
   ======================================== */
.content-box {
    position: relative;
    padding: 2rem;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border-right: 4px solid var(--primary);
    line-height: 1.9;
}

.copy-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--bg-deep);
    font-weight: 600;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

/* ========================================
   Footer (Liara-style minimal footer)
   ======================================== */
footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
    border-top: 1px solid var(--border-subtle);
    background: rgba(12, 14, 20, 0.5);
}

footer p + p {
    margin-top: 8px;
}

/* ========================================
   Admin Header
   ======================================== */
.admin-header {
    padding: 2.5rem 0 2rem;
}

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

.admin-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   One-time Warning Box
   ======================================== */
.warning-box {
    text-align: center;
    color: #ff4d6a;
    font-size: 0.9rem;
    margin-top: 2rem;
    padding: 16px;
    background: rgba(255, 77, 106, 0.04);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 77, 106, 0.2);
}

/* ========================================
   Animations
   ======================================== */
.animate-in {
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 3.5rem 0 2rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 2rem 0;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .logo-img {
        height: 34px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .share-list thead { display: none; }
    .share-list tbody td {
        display: block;
        padding: 0.8rem 1rem;
        border-radius: 0 !important;
    }
    .share-list tbody td:first-child {
        border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
        padding-top: 1.2rem;
    }
    .share-list tbody td:last-child {
        border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
        padding-bottom: 1.2rem;
    }
}

@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 1.2rem;
    }
}
