:root {
    /* Color Palette */
    --primary-color: #4285F4;
    --primary-dark: #3367D6;
    --primary-gradient: linear-gradient(135deg, #4285F4, #2b56ad);
    --secondary-color: #34A853;
    --accent-color: #EA4335;
    
    /* Neutrals */
    --text-color: #1f2937; /* Darker, softer black */
    --text-light: #6b7280; /* Cool gray */
    --background-light: #f3f4f6; /* Very subtle gray background */
    --surface-color: #ffffff;
    --border-color: #e5e7eb;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --spacing-xs: 0.5rem;   
    --spacing-sm: 1rem;     
    --spacing-md: 1.5rem;   
    --spacing-lg: 2rem;     
    --spacing-xl: 3rem;     

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1100px; /* Slightly tighter container for readability */
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.align-center { text-align: center; }
.hidden { display: none !important; }

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.025em; /* Tighten headings slightly */
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-light);
}

/* Header - Glassmorphism */
header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.logo img {
    border-radius: 4px; /* Soften logo corners if square */
}

.logo:hover { color: var(--primary-color); }

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Animated Underline for Nav */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -1px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Main Content */
main {
    flex: 1;
    padding: var(--spacing-lg) 0;
}

/* Tool Container - The Hero Card */
.tool-container {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 3rem 2rem;
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.tool-container:hover {
    box-shadow: var(--shadow-lg);
}

.tool-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--text-color), #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* Fallback */
    color: var(--text-color); /* Fallback */
}

.tool-description {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Inputs */
.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

input[type="text"], 
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--text-color);
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-family: inherit;
}

input[type="text"]:focus, 
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    background-color: var(--surface-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px; /* Slightly larger targets */
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(66, 133, 244, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(66, 133, 244, 0.5);
    filter: brightness(110%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-light);
    background-color: #f9fafb;
}

.btn-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.btn-danger:hover {
    background-color: #fecaca;
}

/* Tool Cards Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.tool-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* Output Area */
.output-area {
    margin-top: 2rem;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.link-display {
    background: var(--surface-color);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--primary-dark);
    word-break: break-all;
}

/* History Section */
.history-section {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.history-item:hover {
    background-color: #f9fafb;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item span {
    font-size: 0.85rem;
    color: var(--text-light);
    min-width: 150px;
}

/* Content Sections (SEO Text) */
.content-section {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.content-section h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    color: var(--text-color);
}

.content-section h2:first-child { margin-top: 0; }

.content-section ul {
    list-style-type: none;
    padding-left: 0;
}

.content-section ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.content-section ul li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Footer */
footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: auto;
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-light);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.copyright {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo { padding: 0; }
    
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .tool-container {
        padding: 2rem 1rem;
    }
    
    h1 { font-size: 2rem; }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .history-item .buttons {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        gap: 0.5rem;
    }
}
