:root {
    /* iLovePDF Style Aesthetic Variable Mapping */
    --primary-color: #E5322D; /* iLovePDF Signature Red */
    --primary-hover: #C72A26;
    --secondary-color: #B22222;
    --bg-color: #F3F4F6; /* Slightly darker background to make white boxes pop */
    --surface-color: #FFFFFF;
    --text-color: #222222;
    --text-light: #555555;
    --border-color: #9CA3AF; /* Much darker and thicker border color for boxes */
    
    /* Clean, Flat, Professional Shadows but Deeper */
    --shadow-sm: 0 4px 8px rgba(0,0,0,0.12); /* Increased shadow depth */
    --shadow-md: 0 6px 12px -2px rgba(0,0,0,0.15);
    --shadow-hover: 0 12px 24px rgba(0,0,0,0.15);
    
    /* Subtle Border Radius */
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header - Flat Classic Layout */
header {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Make only the logo icon red explicitly via HTML classes or inline style */

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

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

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

/* Main Layout */
main {
    flex: 1;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    width: 100%;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeIn 0.4s ease-out;
}

.hero h1 {
    font-size: 2.8rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

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

/* Flat Professional Containers */
.tool-container, .translator-container, .typing-container, .feedback-container {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    margin-bottom: 3rem;
    border: 2px solid var(--border-color); /* Made 2px solid and darker */
}

.converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .converter-grid { grid-template-columns: 1fr; }
}

.textarea-wrapper { display: flex; flex-direction: column; gap: 0.5rem; }

.textarea-wrapper label {
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

textarea {
    width: 100%; height: 300px; padding: 1.5rem;
    border: 2px solid var(--border-color); /* Thicker Darker Border */
    border-radius: var(--radius-md); font-size: 1.1rem;
    resize: vertical; transition: border-color 0.2s;
    background-color: var(--surface-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); /* Make the inside prominent */
}

textarea:focus {
    outline: none; border-color: var(--primary-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05), 0 0 0 3px rgba(229, 50, 45, 0.2);
}

.krutidev-text { font-family: 'Kruti Dev 010', sans-serif; font-size: 1.5rem; }

/* Flat iLovePDF Style Buttons */
.controls {
    display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    border: none; font-weight: 700; font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    transition: all 0.2s; text-decoration: none;
}

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

.btn-outline { background-color: transparent; border: 2px solid var(--border-color); color: var(--text-color); }
.btn-outline:hover { background-color: rgba(0,0,0,0.03); }

/* Tools Grid */
.section-title { font-size: 2rem; margin-bottom: 2rem; text-align: center; font-weight: 700; color: var(--text-color); }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }

.tool-card {
    background: var(--surface-color); border-radius: var(--radius-md); padding: 1.5rem;
    border: 2px solid var(--border-color); /* Thicker card border */
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.8rem;
    transition: all 0.2s ease;
}

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

.tool-icon {
    width: 100px; height: 100px; 
    background: var(--primary-color); /* Fully filled solid red color */
    color: #FFFFFF; /* White icon */
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.2rem; border: 4px solid #FFFFFF; 
    box-shadow: 0 6px 14px rgba(229, 50, 45, 0.35); /* Soft shadow around the filled circle */
}
.tool-icon i { font-size: 50px; }

.tool-card h3 { font-size: 1.2rem; color: var(--text-color); font-weight: 700; }
.tool-card p { color: var(--text-light); font-size: 0.9rem; line-height: 1.4; }

/* Advertisement Banners */
.ad-banner {
    width: 100%; min-height: 90px;
    background: #F1F1F1; border: 1px solid #E5E5E5;
    border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
    color: #999; font-weight: 500; font-size: 0.9rem; margin: 2rem 0;
}

/* Footer */
footer {
    background-color: var(--surface-color); border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 2rem 2rem; text-align: center; color: var(--text-light); display: flex; flex-direction: column; gap: 1rem;
}
.footer-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-links a { color: var(--text-color); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--primary-color); text-decoration: underline; }

/* Toast */
.toast {
    position: fixed; bottom: 30px; right: 30px; background: #333333; color: white;
    padding: 1rem 1.5rem; border-radius: var(--radius-md); box-shadow: var(--shadow-hover);
    transform: translateY(100px); opacity: 0; transition: all 0.3s; z-index: 100; font-weight: 500;
}
.toast.show { transform: translateY(0); opacity: 1; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@font-face {
    font-family: 'Kruti Dev 010';
    src: url('https://fonts.cdnfonts.com/s/29124/Kruti_Dev_010.woff') format('woff');
}

/* Side Ads & Professional Layout for Inner Pages */
.page-layout {
    display: flex; gap: 2rem; width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1rem;
}
.side-ad {
    width: 160px; min-width: 160px; height: 600px; background: #F8F9FA; border: 1px dashed #CBD5E1;
    display: flex; align-items: center; justify-content: center; color: #999; font-size: 0.85rem;
    text-align:center; border-radius: 8px; margin-top: 1rem;
}
.main-content-column {
    flex: 1; max-width: 800px; margin: 0 auto; width: 100%;
}
@media (max-width: 1024px) {
    .page-layout { flex-direction: column; align-items: center; }
    .side-ad { display: none; }
}
