/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --border-color: #ddd;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --ad-bg: #f0f0f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.site-logo {
    width: 36px;
    height: 36px;
    display: inline-block;
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    gap: 1.5rem;
}

.site-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.site-nav a:hover {
    color: var(--primary-color);
}

.lang-select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--white);
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Ad Container Styles */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem auto;
    background-color: var(--ad-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.ad-placeholder {
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Demo ad placeholder styling - Remove in production */
.ad-demo {
    padding: 1rem;
    color: #999;
    font-size: 0.875rem;
    text-align: center;
}

/* Top Banner Ad */
.ad-top-banner {
    max-width: 728px;
    height: 90px;
    margin-top: 1rem;
}

/* Bottom Banner Ad */
.ad-bottom-banner {
    max-width: 728px;
    height: 90px;
    margin: 2rem auto;
}

/* Main Wrapper */
.main-wrapper {
    padding: 2rem 0;
}

/* Content Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

/* Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ad-sidebar {
    width: 300px;
    height: 250px;
}

.sidebar-section {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.sidebar-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.tool-list {
    list-style: none;
}

.tool-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tool-list li:last-child {
    border-bottom: none;
}

.tool-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.tool-list a:hover {
    color: var(--primary-color);
}

/* Main Content Styles */
.main-content {
    min-height: 600px;
}

.tool-container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.tool-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.tool-description {
    margin-bottom: 2rem;
    color: #666;
    font-size: 1.1rem;
}

/* Tool Interface Styles */
.tool-interface {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Button Styles */
.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #3a7bc8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: #6c757d;
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* In-Content Ad */
.ad-in-content {
    max-width: 728px;
    height: 90px;
    margin: 2rem auto;
}

/* Tool Info Styles */
.tool-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.tool-info h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.tool-info ul,
.tool-info ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.tool-info li {
    margin-bottom: 0.5rem;
}

/* Footer Styles */
.site-footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: #666;
    font-size: 0.875rem;
}

/* Consent Banner */
.consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.12);
    z-index: 1000;
}

.consent-banner .consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.consent-banner .consent-text {
    margin: 0;
    color: #555;
    flex: 1 1 auto;
}

.consent-banner .consent-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.consent-banner .consent-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.consent-banner .consent-link:hover {
    text-decoration: underline;
}

.consent-banner-visible {
    padding-bottom: 96px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .main-content {
        order: 1;
    }

    .ad-sidebar {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .lang-select {
        width: 100%;
        max-width: 220px;
    }

    .site-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tool-container {
        padding: 1.5rem;
    }

    .tool-title {
        font-size: 1.5rem;
    }

    /* Stack buttons on small screens */
    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* Smaller ad sizes on mobile */
    .ad-top-banner,
    .ad-bottom-banner,
    .ad-in-content {
        max-width: 320px;
        height: 100px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .consent-banner .consent-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .consent-banner .consent-actions {
        width: 100%;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none;
}
