/* Core Design System & Tokens */
:root {
    --primary: #B56B3E;
    /* Darker Terracotta for WCAG AAA button contrast */
    --secondary: var(--color-92a075);
    /* Sage green */
    --bg-dark: #EDF5EC;
    /* Ultra-pale Green tint */
    --text-main: #121212;
    /* Dark Slate for readable text on light cards */
    --text-muted: #4A4A4A;
    /* Darker grey for excellent paragraph readability */
    --glass-bg: rgba(255, 255, 255, 0.65);
    /* Semi-transparent white for true glass */
    --glass-border: rgba(0, 0, 0, 0.2);
    /* Frosted white edge */
    --brand-blue: #1D4ED8;
    --emerald-green: #196F3D;
    --header-footer-bg: rgba(248, 250, 246, 0.95);
    /* Semi-transparent Off-White */
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

/* Beautiful dynamic background */
body {
    background-color: var(--bg-dark);
    /* Soft, airy gradients to give the glass something to blur */
    background-image:
        radial-gradient(at 10% 10%, rgba(29, 78, 216, 0.06) 0, transparent 40%),
        radial-gradient(at 90% 80%, rgba(173, 235, 179, 0.15) 0, transparent 40%),
        radial-gradient(at 50% 50%, rgba(200, 220, 200, 0.08) 0, transparent 60%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: none;
}

/* Smooth entry animation */
.container {
    width: 95%;
    max-width: none;
    margin: 0 auto;
    padding: 8rem 0 8rem;
    animation: fadeIn 1.2s ease-out forwards;
    opacity: 0;
}

/* Glassmorphism Card Design */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow:
        var(--card-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    /* Inner rim lighting for glass */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(29, 78, 216, 0.1);
    transform: translateY(-5px);
}

.brand-title {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    line-height: 1.1;
}

/* Prominent Brand Text */
.glow-text {
    font-size: 3.5rem;
    /* Slightly smaller to fit both words on one line */
    font-weight: 800;
    color: var(--brand-blue);
    filter: drop-shadow(0 0 15px rgba(29, 78, 216, 0.2));
    letter-spacing: 2px;
}

.brand-global {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 8px;
    margin-left: 12px;
    text-transform: uppercase;
}

.arriving-soon {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3.5rem;
    font-weight: 400;
    line-height: 1.6;
}

/* Micro-animations: Loader */
.loader {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.loader span {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--emerald-green), var(--secondary));
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader span:nth-child(1) {
    animation-delay: -0.32s;
}

.loader span:nth-child(2) {
    animation-delay: -0.16s;
}

/* Keyframes */
@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 15px rgba(25, 111, 61, 0.6);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger Button (hidden on desktop) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animated X when open */
.hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}

/* Navigation Bar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--header-footer-bg);
    /* Pastel Green Header */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.nav-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--brand-blue);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nav-brand span {
    font-weight: 300;
    color: var(--brand-blue);
    margin-left: 5px;
    letter-spacing: 3px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--emerald-green);
}

/* Fixed Footer Styles */
.fixed-footer {
    position: relative;
    width: 100%;
    margin-top: 4rem;
    padding: 1.5rem 3rem;
    text-align: center;
    background: var(--header-footer-bg);
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--brand-blue);
}

/* Tool Section */
.tool-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.tool-header {
    color: var(--emerald-green);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.tool-desc {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    text-align: center;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-input {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

input.tool-input,
select.tool-input {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    margin: 0;
    outline: none;
    transition: border-color 0.3s ease;
}

select.tool-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23196F3D'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em;
    padding-right: 2.5rem;
}

.tool-input:focus,
input:focus,
textarea:focus,
select:focus,
.case-io:focus,
.unit-input:focus,
.regex-io:focus {
    outline: none !important;
    border-color: var(--emerald-green) !important;
    box-shadow: 0 0 0 3px rgba(25, 111, 61, 0.25) !important;
}

.tool-panel {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
}

/* Standard Global Buttons */
.btn,
.tool-btn,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    padding: 0 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

/* Primary colors */
.btn,
.tool-btn {
    color: #FFFFFF;
    background-color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 4px 12px rgba(25, 111, 61, 0.2);
}

.btn:hover,
.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(25, 111, 61, 0.35);
    background-color: var(--glass-bg);
    color: var(--primary);
}

/* Secondary colors */
.btn-secondary {
    color: var(--primary);
    background-color: var(--glass-bg);
    border: 1px solid var(--primary);
    box-shadow: 0 2px 8px rgba(25, 111, 61, 0.1);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(25, 111, 61, 0.35);
}


.btn-small {
    padding: 0 0.75rem !important;
    font-size: 0.8rem !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
}

.results-container {
    min-height: 60px;
    font-size: 1.2rem;
    color: var(--text-main);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.result-pill {
    background: rgba(25, 111, 61, 0.2);
    border: 1px solid var(--emerald-green);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* AdSense Placeholder */
.ad-container {
    display: none;
    background: rgba(0, 0, 0, 0.1);
    border: 1px dashed var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
}

.ad-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.ad-content {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Tools Dashboard Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: left;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
}

.tool-card::after {
    content: attr(data-category);
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--emerald-green);
    font-weight: 600;
    opacity: 0.9;
}

.tool-card:hover:not(.disabled) {
    transform: translateY(-5px);
    border-color: var(--emerald-green);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08), 0 0 15px rgba(25, 111, 61, 0.2);
}

.tool-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tool-icon {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.tool-title {
    color: var(--brand-blue);
    font-size: 1.15rem;
    margin: 0;
}

.tool-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* Category Filter Bar */
.filter-bar {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary);
    color: var(--text-muted);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.filter-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

/* Safari/iOS Interaction Fixes */
.cropper-container {
    touch-action: none;
}

/* Global Custom Checkbox */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--emerald-green);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin: 0;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background-color: var(--emerald-green);
    border-color: var(--emerald-green);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}



/* Global Slider Style */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.15);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--emerald-green);
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--emerald-green);
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: none;
}

input[type="range"]::-webkit-slider-thumb:hover,
input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.15);
}

/* Password Generator Layout */
.password-output-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

/* Global Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    transition: .4s;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-main);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-toggle {
    background-color: var(--emerald-green);
    border-color: var(--emerald-green);
}

input:checked + .slider-toggle:before {
    transform: translateX(20px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--header-footer-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--glass-border);
        padding: 1rem 0;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    .nav-links li {
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 0.8rem 2rem;
        font-size: 1.05rem;
    }

    .nav-links a:hover {
        background: rgba(0, 0, 0, 0.03);
    }

    .container {
        padding-top: 5rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
    }

    .fixed-footer {
        padding: 1.2rem 1rem;
        font-size: 0.8rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 500px) {
    .glow-text {
        font-size: 2.2rem;
    }

    .brand-global {
        font-size: 1rem;
        letter-spacing: 5px;
        margin-left: 6px;
    }

    .glass-card {
        padding: 1.5rem 1rem;
        border-radius: 14px;
    }

    p {
        font-size: 1rem;
    }

    .container {
        width: 98%;
        padding-top: 4.5rem;
    }

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

    .filter-bar {
        gap: 0.4rem;
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

