/* =========================================
   skinchat.site - Modern Design System
   ========================================= */

:root {
    --bg-dark: #0a0e17;
    --bg-card: rgba(18, 24, 38, 0.75);
    --bg-card-hover: rgba(26, 34, 52, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #06b6d4;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --primary: #06b6d4;
    --primary-hover: #0891b2;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.18);
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Ambient Glow Background */
.glow-bg {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 15%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 80% 25%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Navbar */
.navbar {
    border-bottom: 1px solid var(--border-color);
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 16px 0;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-badge {
    color: var(--primary);
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.925rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.825rem;
}

.btn-icon-only {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-icon-only:hover {
    color: var(--text-primary);
    border-color: var(--primary);
}

/* Hero Section */
.hero-section {
    padding: 60px 0 40px;
    text-align: center;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 999px;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 0.5; transform: scale(0.9); }
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    max-width: 620px;
    margin: 0 auto 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Shortener Box */
.shortener-card {
    max-width: 820px;
    margin: 0 auto;
    padding: 24px;
    text-align: left;
    box-shadow: var(--shadow-glow);
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(10, 14, 23, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 6px 8px 6px 16px;
    gap: 10px;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.input-icon {
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

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

.btn-paste {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-paste:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Options Toggle */
.options-toggle-wrapper {
    margin-top: 14px;
}

.toggle-options-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color 0.2s;
}

.toggle-options-btn:hover {
    color: var(--primary);
}

/* Advanced Options Grid */
.advanced-options {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group input {
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
    transition: border 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
}

.prefix-input {
    display: flex;
    align-items: center;
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.prefix-input .prefix {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    border-right: 1px solid var(--border-color);
    user-select: none;
}

.prefix-input input {
    border: none;
    background: transparent;
    flex: 1;
    border-radius: 0;
}

.helper-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Result Box */
.result-box {
    margin-top: 24px;
    padding: 20px;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: var(--radius-md);
    animation: fadeIn 0.3s ease;
}

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

.success-badge {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.short-url-display {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.short-url-display input {
    flex: 1;
    background: rgba(10, 14, 23, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    outline: none;
}

.result-extras {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.qr-preview-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px;
    border-radius: var(--radius-md);
    width: 140px;
}

.qr-preview-box img {
    width: 120px;
    height: 120px;
    display: block;
}

.qr-preview-box .btn {
    width: 100%;
    color: #0f172a;
    font-size: 0.75rem;
    padding: 4px;
}

.link-meta-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.875rem;
}

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

.link-meta-info p strong {
    color: var(--text-primary);
}

.truncate {
    display: inline-block;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* Dashboard Section */
.dashboard-section {
    padding: 40px 0 80px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.table-card {
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.links-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.links-table th,
.links-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.links-table th {
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.links-table tbody tr {
    transition: background 0.15s;
}

.links-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.link-slug {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.link-slug:hover {
    text-decoration: underline;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 15, 0.8);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.modal-subtitle {
    color: var(--primary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: color 0.2s;
}

.btn-close:hover {
    color: var(--text-primary);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.bg-cyan { background: rgba(6, 182, 212, 0.2); color: var(--primary); }
.bg-purple { background: rgba(139, 92, 246, 0.2); color: var(--accent); }
.bg-emerald { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.bg-amber { background: rgba(245, 158, 11, 0.2); color: var(--warning); }

.metric-data {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* Breakdown Grid */
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.breakdown-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
}

.breakdown-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.breakdown-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.825rem;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.footer-links {
    display: flex;
    gap: 8px;
}

/* Helper spin animation */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 868px) {
    .hero-title { font-size: 2.2rem; }
    .options-grid { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .breakdown-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 10px; }
    .input-wrapper { flex-wrap: wrap; }
    .btn-paste { display: none; }
    .result-extras { flex-direction: column; align-items: center; }
}
