:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

header {
    text-align: center;
    padding: 4rem 0;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 40px -5px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(168, 85, 247, 0.5);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.tool-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.tool-desc {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Button & Form Styles */
.btn {
    background: var(--primary-gradient);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    opacity: 0.9;
}

input,
textarea,
select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #a855f7;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

/* Fix Dropdown Options in Dark Mode */
select option {
    background-color: #0f172a;
    color: white;
    padding: 10px;
}

/* Fix Autocomplete/Autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
    -webkit-text-fill-color: white !important;
    caret-color: white;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(12px);
}

.logo {
    height: 80px;
    width: auto;
    margin-bottom: 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sub-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .tool-title {
        font-size: 1.25rem;
    }

    .tool-desc {
        font-size: 0.95rem;
    }

    /* Keep grid-2 as 2 columns on mobile for personal info as requested */
    .grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        /* Smaller gap for mobile */
    }

    header {
        padding: 2rem 0;
    }

    .logo {
        height: 60px;
    }

    /* Sub-page headers */
    .sub-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}