:root {
    --primary: #10b981; /* Emerald */
    --primary-hover: #059669;
    --accent: #ef4444; /* Red for YouTube */
    --accent-blue: #3b82f6; /* Blue for Web */
    
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --input-bg: rgba(15, 23, 42, 0.6);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cairo', sans-serif; }

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.15) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, rgba(239, 68, 68, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    padding: 40px 20px;
    display: flex; justify-content: center; align-items: center;
}

.app-container { width: 100%; max-width: 800px; display: flex; flex-direction: column; gap: 25px; }

.tool-card {
    background: var(--card-bg); backdrop-filter: blur(16px);
    border: 1px solid var(--border-color); border-radius: 24px; padding: 35px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.tool-header { text-align: center; margin-bottom: 25px; }
.icon-wrapper {
    display: inline-flex; justify-content: center; align-items: center;
    width: 70px; height: 70px; background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px; margin-bottom: 16px; box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.5);
    transition: background 0.3s;
}
.icon-wrapper ion-icon { font-size: 36px; color: white; }
.tool-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.tool-header p { color: var(--text-muted); font-size: 1rem; }

/* Tabs */
.tabs-container { display: flex; gap: 10px; margin-bottom: 25px; }
.tab-btn {
    flex: 1; background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-muted);
    padding: 15px; border-radius: 12px; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: all 0.3s;
    display: flex; justify-content: center; align-items: center; gap: 8px;
}
.tab-btn ion-icon { font-size: 1.3rem; }
.tab-btn.active[data-target="youtube"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab-btn.active[data-target="website"] { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }

/* Controls */
.controls-section { background: var(--input-bg); padding: 25px; border-radius: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 25px; margin-bottom: 25px;}

.slider-group { display: flex; flex-direction: column; gap: 12px; }
.slider-group label { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.slider-group span { background: rgba(255,255,255,0.05); color: #fff; padding: 5px 12px; border-radius: 8px; font-weight: 800; border: 1px solid var(--border-color); direction: ltr;}

input[type="range"] {
    width: 100%; height: 8px; border-radius: 5px; outline: none; appearance: none;
    background: rgba(255,255,255,0.1);
}
input[type="range"]::-webkit-slider-thumb {
    appearance: none; width: 22px; height: 22px; border-radius: 50%;
    background: var(--primary); cursor: pointer; transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.2); }

/* Results */
.results-section { display: flex; gap: 15px; }
.result-box {
    flex: 1; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 16px;
    padding: 20px; text-align: center; display: flex; flex-direction: column; justify-content: center;
}
.result-box.highlight { background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05)); border-color: var(--primary); transform: scale(1.05); box-shadow: 0 10px 25px rgba(0,0,0,0.2); z-index: 1;}
.res-title { display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 600;}
.res-value { font-size: 1.8rem; font-weight: 800; color: #fff; direction: ltr;}
.highlight .res-value { font-size: 2.2rem; }

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent-blue); }

/* SEO */
.seo-content { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; padding: 25px; }
.seo-content h2 { font-size: 1.3rem; color: #fff; margin-bottom: 12px; }
.seo-content p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.8; margin-bottom: 10px; }
.seo-content strong { color: var(--primary); }

.ads-container { width: 100%; display: flex; justify-content: center; }
.ads-placeholder { width: 100%; max-width: 728px; height: 90px; background: rgba(15, 23, 42, 0.5); border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 12px; display: flex; justify-content: center; align-items: center; color: var(--text-muted); }

@media (max-width: 768px) {
    .results-section { flex-direction: column; }
    .result-box.highlight { transform: none; }
}


/* Light Mode Theme Auto-injected */
body.light-mode {
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.85);
    --input-bg: rgba(255, 255, 255, 0.95);
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .tool-card, 
body.light-mode .article-container,
body.light-mode .seo-content {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #0f172a !important;
}

body.light-mode select, 
body.light-mode input, 
body.light-mode textarea {
    background: #fff;
    color: #0f172a;
    border-color: rgba(0,0,0,0.2);
}

body.light-mode .logo { color: #0f172a !important; text-shadow: none !important; }



/* Layout Fixes for Header & Footer */
body {
    display: block !important;
}
.app-container, .article-container {
    margin-left: auto !important;
    margin-right: auto !important;
}
