:root {
    --primary: #4c9855; /* Muzazco Green */
    --accent: #338dbc; /* Muzazco Blue */
    --bg-main: #f1f5f9;
    --card-bg: #fff;
    --card-border: #e2e8f0;
    --text-main: #111827;
    --text-muted: #64748b;
    --danger: #ef4444;
    
    font-family: 'Outfit', sans-serif;
}

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

body { background: var(--bg-main); color: var(--text-main); min-height: 100vh; }

/* Ad Bar */
.top-ad-bar { width: 100%; background: #fff; border-bottom: 1px solid var(--card-border); padding: 0.5rem 0; text-align: center; min-height: 100px; display: flex; justify-content: center; }
.ad-placeholder { width: 728px; height: 90px; background: #f8fafc; border: 1px dashed #cbd5e1; color: #94a3b8; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; border-radius: 4px; }

/* Page Layout */
.page-wrapper { display: flex; max-width: 1400px; margin: 0 auto; padding: 1rem; gap: 1.5rem; }
.main-content { flex: 1; max-width: 800px; margin: 0 auto; }
.side-ad { width: 160px; }
@media (max-width: 1100px) { .side-ad { display: none; } }
.ad-placeholder-vertical { width: 160px; height: 600px; background: #fff; border: 1px dashed #cbd5e1; position: sticky; top: 1rem; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; color: #94a3b8; text-transform: uppercase; font-size: 0.7rem; border-radius: 8px; }

/* Header Branding */
.hero-header { text-align: center; margin-bottom: 1rem; }
.badge { background: #f0fdf4; color: var(--primary); padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 700; border: 1px solid #dcfce7; margin-bottom: 0.5rem; display: inline-block; }
.hero-header h1 { font-size: 2.25rem; font-weight: 850; background: linear-gradient(135deg, #000, var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Dashboard Tool Card */
.dashboard-card { background: #fff; border: 1px solid var(--card-border); border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 15px -10px rgba(0,0,0,0.05); margin-bottom: 1.5rem; }

/* Shorten Section */
.shorten-section { margin-bottom: 1.5rem; }
.input-wrapper { display: flex; gap: 0.5rem; background: #fff; border: 2px solid #e2e8f0; padding: 0.5rem; border-radius: 12px; align-items: center; transition: all 0.2s; }
.input-wrapper:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(76, 152, 85, 0.05); }
.input-icon { color: #94a3b8; margin-left: 0.75rem; width: 20px; }
.input-wrapper input { flex: 1; border: none; padding: 0.75rem; font-size: 1rem; font-family: inherit; color: var(--text-main); }
.input-wrapper input:focus { outline: none; }

.btn-main { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 750; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.btn-main:hover { transform: translateY(-1px); filter: brightness(1.1); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* Loader & Error */
.loader { border: 3px solid #f3f3f3; border-top: 3px solid var(--primary); border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; margin: 1rem auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.error-msg { text-align: center; color: var(--danger); font-size: 0.85rem; font-weight: 600; margin-top: 0.5rem; }

/* Result Card */
.result-card { background: #f0fdf4; border: 1px solid #dcfce7; border-radius: 12px; padding: 1.25rem; margin-bottom: 2rem; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.result-header h3 { font-size: 0.95rem; color: #166534; font-weight: 700; }
.copy-status { font-size: 0.75rem; font-weight: 750; color: var(--primary); opacity: 0; transition: opacity 0.2s; }

.short-url-box { display: flex; gap: 0.5rem; background: #fff; border: 1px solid #dcfce7; padding: 0.5rem; border-radius: 10px; align-items: center; }
.short-url-box input { flex: 1; border: none; background: transparent; font-size: 1.1rem; font-weight: 750; color: var(--accent); padding: 0.5rem; cursor: pointer; }

.btn-icon-main { background: var(--primary); color: #fff; border: none; padding: 0.7rem 1.25rem; border-radius: 8px; font-weight: 750; cursor: pointer; display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
.btn-icon-main:hover { filter: brightness(1.1); }

.share-group { margin-top: 1rem; display: flex; align-items: center; gap: 1rem; }
.share-group .label { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; color: #166534; }
.share-actions { display: flex; gap: 0.5rem; }
.share-btn { border: none; width: 36px; height: 36px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.share-btn i { width: 16px; height: 16px; }
.fb { background: #1877F2; } .tw { background: #1DA1F2; } .wa { background: #25D366; }
.share-btn:hover { transform: scale(1.1); filter: brightness(1.1); }

/* Analytics Dashboard */
.analytics-container { border-top: 1px solid #f1f5f9; padding-top: 2rem; }
.analytics-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.analytics-header h3 { font-size: 1.1rem; }
.clear-btn { border: none; background: transparent; color: #94a3b8; font-size: 0.75rem; font-weight: 750; cursor: pointer; }
.clear-btn:hover { color: var(--danger); text-decoration: underline; }

.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.analytics-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.analytics-table th { text-align: left; padding: 1rem; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: #94a3b8; border-bottom: 2px solid #f1f5f9; }
.analytics-table td { padding: 1rem; border-bottom: 1px solid #f8fafc; vertical-align: middle; }
.col-link { max-width: 300px; }
.link-info { display: flex; flex-direction: column; }
.long-url-text { font-size: 0.75rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; display: block; }
.short-url-text { font-weight: 750; color: var(--accent); text-decoration: none; font-size: 0.95rem; }
.short-url-text:hover { text-decoration: underline; }

.col-clicks { width: 100px; }
.click-badge { background: #f1f5f9; color: var(--text-main); padding: 0.25rem 0.6rem; border-radius: 20px; font-size: 0.8rem; font-weight: 850; display: inline-block; }
.col-date { font-size: 0.8rem; color: #94a3b8; width: 120px; }
.col-action { text-align: right; width: 40px; }

.del-btn { border: none; background: transparent; color: #cbd5e1; cursor: pointer; transition: 0.2s; }
.del-btn:hover { color: var(--danger); }

.empty-msg { text-align: center; color: #94a3b8; font-size: 0.9rem; padding: 3rem 0; }

/* In-Content Ad */
.content-ad { margin: 1.5rem 0; padding: 1rem; background: #fff; border-radius: 12px; border: 1px solid var(--card-border); text-align: center; }
.ad-placeholder-rect { width: 300px; height: 250px; background: #f8fafc; border: 1px dashed #cbd5e1; margin: 0 auto; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 0.7rem; }

/* SEO Article */
.seo-article { background: #fff; padding: 1.5rem; border-radius: 12px; border: 1px solid var(--card-border); margin-top: 2rem; }
.seo-article h2 { font-size: 1.5rem; margin-bottom: 0.85rem; }
.seo-article p { font-size: 0.95rem; line-height: 1.6; color: #4b5563; margin-bottom: 1.5rem; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.info-card { background: #f8fafc; padding: 1rem; border-radius: 10px; }
.info-card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.info-card p { font-size: 0.85rem; color: #64748b; }

/* Footer */
.legal-footer { padding: 3rem 1rem; text-align: center; border-top: 1px solid var(--card-border); background: #fff; margin-top: 2rem; }
.legal-footer p { font-size: 0.8rem; color: #94a3b8; }
.legal-footer a { color: inherit; text-decoration: none; font-size: 0.8rem; margin: 0 0.5rem; }

.hidden { display: none !important; }
@media (max-width: 600px) {
    .input-wrapper { flex-direction: column; padding: 0.5rem; gap: 0.5rem; }
    .btn-main { width: 100%; border-radius: 12px; }
    .share-group { flex-direction: column; align-items: flex-start; }
    .info-grid { grid-template-columns: 1fr; }
}
