:root {
    /* Colors */
    --primary-color: #2563EB;
    --primary-hover: #1d4ed8;
    --bg-color: #F8FAFC;
    --surface-color: #FFFFFF;
    --text-color: #1E293B;
    --text-light: #64748B;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Spacing */
    --radius: 12px;
    --container-width: 1200px;
    --header-height: 70px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px 60px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-color);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid System */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
}

/* cards */
.card {
    background-color: var(--surface-color);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-icon {
    width: 48px;
    height: 48px;
    background-color: #EFF6FF;
    /* user primary tint */
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Ad Placeholders */
.ad-container-top,
.ad-container-middle {
    background-color: #F1F5F9;
    border: 1px dashed #CBD5E1;
    border-radius: var(--radius);
    margin: 32px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-size: 0.875rem;
}

.ad-container-top {
    width: 100%;
    max-width: 728px;
    height: 90px;
}

.ad-container-middle {
    width: 100%;
    max-width: 300px;
    height: 250px;
}

/* Tool Page Specifics */
main.tool-page {
    padding-top: 40px;
}

.tool-header {
    text-align: center;
    margin-bottom: 32px;
}

.tool-header h1 {
    font-size: 2.25rem;
    margin-bottom: 12px;
}

.tool-wrapper {
    background-color: var(--surface-color);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

/* Article/Content */
article {
    max-width: 800px;
    margin: 0 auto 80px;
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

article h2 {
    font-size: 1.5rem;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-color);
}

article p,
article ul,
article li {
    color: var(--text-light);
    margin-bottom: 16px;
}

article ul {
    padding-left: 20px;
    list-style-type: disc;
}

/* Footer */
footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-light);
}

footer a {
    color: var(--primary-color);
    margin: 0 10px;
}

footer p {
    margin-top: 16px;
    font-size: 0.875rem;
}

/* Form Elements for Tools - default styling */
textarea,
input,
select,
button {
    font-family: inherit;
    font-size: 1rem;
    border-radius: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

textarea,
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: #F8FAFC;
    transition: border-color 0.2s;
}

textarea:focus,
input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }

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

    .tool-wrapper {
        padding: 20px;
    }
}

/* Cookie Consent Banner */
#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1e293b;
    color: #fff;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#cookie-banner p {
    margin: 0;
    font-size: 14px;
    flex: 1;
}

#cookie-banner a {
    color: #60a5fa;
    text-decoration: underline;
}

.cookie-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.cookie-accept {
    background-color: #22c55e;
    color: white;
}

.cookie-decline {
    background-color: #64748b;
    color: white;
}

@media (max-width: 600px) {
    #cookie-banner {
        flex-direction: column;
        text-align: center;
    }

    #cookie-banner div {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}