:root {
    --primary-color: #3955A2;
    --primary-hover: #2c4280;
    --secondary-color: #3d3d3d;
    --background-color: #fcfcfc;
    /* Very light gray/white */
    --surface-color: #ffffff;
    --text-color: #3d3d3d;
    --text-muted: #6b7280;
    --border-color: #e2e8f0;
    --radius: 0.5rem;
    --header-height: 4rem;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
    /* User request */
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

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

.logo {
    font-weight: 600;
    font-size: 1.25rem;
    /* ~20px */
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
}

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

main {
    flex: 1;
    padding: 2rem 0;
}

footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Typography Overrides based on request */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--primary-color);
}

h1 {
    font-size: 1.75rem;
}

/* Scaled slightly up for main titles */
h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 18px;
}

/* User specified 18px for headers (likely card headers) */

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 16px;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(57, 85, 162, 0.2);
}

.card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

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

.card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.input-group {
    margin-bottom: 1rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.2s;
    font-size: 16px;
}

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

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Specific Page Styles */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.tool-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

/* Whois Result Styling - Modern & Clean */
.whois-result {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.whois-raw {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: var(--text-color);
    white-space: pre-wrap;
    line-height: 1.5;
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

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

.info-card {
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
    color: var(--primary-color);
    word-break: break-all;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        /* User request: 16px - 2px */
    }

    h3 {
        font-size: 16px;
        /* User request: 18px - 2px */
    }

    .btn {
        font-size: 14px;
        padding: 0.6rem 1.2rem;
    }

    .logo {
        font-size: 1.1rem;
    }
}
/* Responsive Grid Fixes */
.grid { display: grid; gap: 1.5rem; }
@media (max-width: 768px) { .grid-cols-1 { grid-template-columns: repeat(2, 1fr) !important; } h1, h2, h3, h4, h5, h6 { font-size: 16px !important; } p, a, span, li, div { font-size: 14px !important; } .hero h1 { font-size: 20px !important; } }
@media (min-width: 1024px) { .lg\:grid-cols-3, .lg\:grid-cols-4 { grid-template-columns: repeat(3, 1fr) !important; } }

/* Horizontal Slider Layout */
.tool-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1.5rem; padding-bottom: 1.5rem; -webkit-overflow-scrolling: touch; }
.tool-slider::-webkit-scrollbar { height: 8px; }
.tool-slider::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.tool-slider::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.tool-slider .card-link { flex: 0 0 280px; scroll-snap-align: start; min-width: 250px; }
@media (max-width: 768px) { .tool-slider .card-link { flex: 0 0 85%; } }

/* === MODERN HEADER REDESIGN === */
:root { --header-height: 80px; --header-scroll-height: 60px; }

header { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; transition: all 0.3s ease; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02); }
header.scrolled { height: var(--header-scroll-height); background: rgba(255, 255, 255, 0.98); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); }

.navbar { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.5px; }

/* Desktop Nav */
.desktop-nav { display: flex; gap: 2rem; align-items: center; }
.nav-link { color: var(--text-color); font-weight: 500; font-size: 0.95rem; position: relative; padding: 0.5rem 0; transition: color 0.3s; }
.nav-link:hover { color: var(--primary-color); }
.nav-link::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background-color: var(--primary-color); transition: width 0.3s; }
.nav-link:hover::after { width: 100%; }

/* CTA Button */
.btn-cta { background: var(--primary-color); color: white; padding: 0.6rem 1.5rem; border-radius: 50px; font-weight: 600; font-size: 0.9rem; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(57, 85, 162, 0.3); color: white; }

/* Mobile Trigger */
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.5rem; color: var(--text-color); }

/* Mobile Off-canvas */
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.5); z-index: 998; opacity: 0; visibility: hidden; transition: all 0.3s; backdrop-filter: blur(3px); }
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

.mobile-sidebar { position: fixed; top: 0; right: -300px; width: 280px; height: 100vh; background: white; z-index: 999; padding: 2rem; box-shadow: -5px 0 15px rgba(0,0,0,0.1); transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; }
.mobile-sidebar.active { right: 0; }

.mobile-sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }

.mobile-nav-links { display: flex; flex-direction: column; gap: 1rem; }
.mobile-nav-item { border-bottom: 1px solid var(--border-color); padding-bottom: 0.8rem; }
.mobile-nav-link { font-size: 1.1rem; font-weight: 500; color: var(--text-color); display: block; }
.mobile-nav-link:hover { color: var(--primary-color); }

/* Dropdown in Mobile */
.mobile-dropdown-content { display: none; padding-left: 1rem; margin-top: 0.5rem; border-left: 2px solid var(--border-color); }
.mobile-dropdown-content.show { display: block; }
.mobile-dropdown-content a { display: block; padding: 0.5rem 0; color: var(--text-muted); font-size: 0.95rem; }

@media (max-width: 900px) { .desktop-nav { display: none; } .mobile-toggle { display: block; } }
