/* --- 1. Core Variables (from your tool files) --- */
:root {
    --primary-gradient: linear-gradient(135deg, #007BFF 0%, #00BFFF 100%);
    --primary-color: #007BFF;
    --primary-glow: color-mix(in srgb, var(--primary-color) 30%, transparent);
    --background-gradient: linear-gradient(135deg, #e9eefc 0%, #fdfdff 100%);
    --card-background: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.3);
    --input-background: rgba(255, 255, 255, 0.5);
    --text-color: #3c4257;
    --heading-color: #1a202c;
    --subtle-text-color: #6b7280;
    --shadow-color: rgba(100, 116, 139, 0.12);
    --border-color: #e2e8f0;
    --font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
}

[data-theme="dark"] {
    --primary-gradient: linear-gradient(135deg, #7aa2f7 0%, #bb9af7 100%);
    --primary-color: #7aa2f7;
    --primary-glow: color-mix(in srgb, var(--primary-color) 25%, transparent);
    --background-gradient: linear-gradient(135deg, #1e223a 0%, #1a1b26 100%);
    --card-background: rgba(36, 40, 59, 0.65);
    --card-border: rgba(255, 255, 255, 0.1);
    --input-background: rgba(25, 27, 38, 0.5);
    --text-color: #a9b1d6;
    --heading-color: #c0caf5;
    --subtle-text-color: #565f89;
    --shadow-color: rgba(0, 0, 0, 0.25);
    --border-color: #414868;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- 2. Global Setup --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-family);
    background: var(--background-gradient);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
    color: var(--text-color);
    line-height: 1.6;
    transition: color 0.3s ease;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { color: var(--primary-color); text-decoration: none; }
/* --- CHANGE: Removed underline on hover --- */
a:hover { text-decoration: none; }

/* --- 3. Header, Logo, and Nav --- */
header {
    background-color: var(--card-background);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--card-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
header .container { display: flex; justify-content: space-between; align-items: center; }
.logo-container { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo { height: 40px; width: auto; }
.logo-container h1, .logo-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.desktop-nav { display: none; }
.desktop-nav ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; }
.desktop-nav a { text-decoration: none; color: var(--text-color); font-weight: 500; transition: color 0.2s ease; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--primary-color); }

/* --- 4. Theme Toggle Button (SVG based) --- */
.theme-toggle-btn { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-color); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; transition: all 0.3s ease; }
.theme-toggle-btn:hover { background-color: var(--border-color); transform: scale(1.1) rotate(15deg); }
.theme-toggle-btn svg { width: 20px; height: 20px; }
[data-theme="dark"] #sunIcon { display: block; } [data-theme="dark"] #moonIcon { display: none; }
[data-theme="light"] #sunIcon { display: none; } [data-theme="light"] #moonIcon { display: block; }

/* --- 5. Main Content & Sections --- */
main { padding: 3rem 0; }
.section-title { font-size: 2.5rem; font-weight: 700; color: var(--heading-color); text-align: center; margin-bottom: 2.5rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

.tool-card {
    background-color: var(--card-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.tool-card:hover { transform: translateY(-10px); box-shadow: 0 12px 30px var(--shadow-color); }
.tool-card-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.tool-card-content { padding: 1.5rem; text-align: center; flex-grow: 1; display: flex; flex-direction: column; }
.tool-card-content h3 { color: var(--heading-color); font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.tool-card-content p { color: var(--text-color); font-size: 0.9rem; flex-grow: 1; }

/* --- Featured Tool Section --- */
.featured-tool {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 4rem;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.featured-content .badge {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.featured-content h2 {
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}
.featured-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--text-color);
}
.featured-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

/* --- NEW: Banner Ad Section --- */
.banner-ad {
    max-width: 728px;
    height: 90px;
    margin: 4rem auto;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--subtle-text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- 6. Video Section --- */
.video-tutorial { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2.5rem; margin: 4rem 0 2rem 0; }
.video-thumbnail { position: relative; cursor: pointer; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px var(--shadow-color); background-color: #1c2a4e; background-repeat: no-repeat; background-position: center center; background-size: cover; aspect-ratio: 16 / 9; display: flex; justify-content: center; align-items: center; }
.video-thumbnail::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.2); transition: background-color 0.3s ease; }
.video-thumbnail:hover::before { background-color: rgba(0, 0, 0, 0.4); }
.play-button { position: relative; z-index: 2; width: 80px; height: 80px; background-color: rgba(255, 255, 255, 0.9); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--primary-color); font-size: 2rem; transition: transform 0.3s ease, background-color 0.3s ease; padding-left: 5px; }
.video-thumbnail:hover .play-button { transform: scale(1.1); background-color: #fff; }
.video-content .section-title { text-align: left; margin-bottom: 1rem; }
.btn-primary { display: inline-block; background: var(--primary-gradient); color: white; padding: 0.75rem 1.5rem; border-radius: 12px; text-decoration: none; font-weight: 600; border: none; cursor: pointer; background-size: 200% auto; transition: all 0.4s ease; }
.btn-primary:hover { background-position: right center; transform: translateY(-2px); box-shadow: 0 4px 15px var(--primary-glow); }

/* --- CHANGE: Styles for smaller YouTube button --- */
.video-content .btn-primary {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1rem;
}

/* --- 7. Video Modal --- */
.video-modal { display: none; position: fixed; z-index: 1000; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); justify-content: center; align-items: center; }
.video-modal.modal-active { display: flex; }
.modal-content { position: relative; width: 90%; max-width: 800px; }
.close-modal { position: absolute; top: -40px; right: 0; color: #fff; font-size: 2.5rem; font-weight: bold; cursor: pointer; transition: color 0.2s ease; }
.close-modal:hover { color: #ccc; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; background-color: #000; border-radius: 8px; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* --- 8. Footer --- */
footer { background-color: var(--card-background); padding: 3rem 0 1.5rem 0; margin-top: 3rem; border-top: 1px solid var(--card-border); color: var(--subtle-text-color); }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand .logo { height: 35px; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; max-width: 300px; }
.footer-links h4 { color: var(--heading-color); font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 0.5rem; }
.footer-links ul a { text-decoration: none; color: var(--subtle-text-color); transition: color 0.2s ease; }
.footer-links ul a:hover { color: var(--primary-color); }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border-color); font-size: 0.85rem; }

/* --- 9. Static Content Pages (About, Privacy, etc.) --- */
.content-page-section { background-color: var(--card-background); padding: 3rem 2rem; border-radius: 16px; border: 1px solid var(--card-border); max-width: 900px; margin: 0 auto; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.content-page-section h1 { font-size: 2.5rem; color: var(--heading-color); margin-bottom: 1rem; text-align: center; }
.content-page-section h2 { font-size: 1.75rem; color: var(--heading-color); margin-top: 2.5rem; margin-bottom: 1rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 0.5rem; }
.content-page-section p, .content-page-section li { font-size: 1rem; line-height: 1.8; margin-bottom: 1rem; }
.content-page-section ul { list-style-position: inside; padding-left: 1rem; }
.content-page-section small { color: var(--subtle-text-color); }

/* --- 10. Responsive Design --- */
@media (min-width: 769px) { .desktop-nav { display: block; } }

@media (max-width: 992px) {
    .featured-tool { display: none; }
    .video-content .section-title { text-align: center; }
}

@media (max-width: 768px) {
    .logo-container h1, .logo-container h2 { font-size: 1.25rem; }
    .video-tutorial { grid-template-columns: 1fr; gap: 1.5rem; }
    .video-content { text-align: center; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .footer-brand { grid-column: 1 / -1; text-align: center; margin-bottom: 1rem; }
    .footer-brand p { margin: 0 auto; font-size: 0.85rem; }
    .footer-links { text-align: center; }
    .section-title { font-size: 2rem; }
    .content-page-section h1 { font-size: 2.2rem; }
    /* --- NEW: Responsive Banner Ad --- */
    .banner-ad {
        max-width: 320px;
        height: 100px;
    }
}

@media (max-width: 500px) {
    .section-title { font-size: 1.8rem; }
    .content-page-section h1 { font-size: 2rem; }
}