/* Functional Suite Variables (Inspired by Utility Tools) */
:root {
    --primary: #e3342f;
    /* Red-like accent if we want to mimic, but let's stick to a strong Blue/Indigo for WebTools */
    --brand-color: #4338ca;
    /* Indigo 700 */
    --brand-accent: #6366f1;
    /* Indigo 500 */
    --bg-body: #eef2f6;
    /* Darker, distinct gray to make white cards pop */
    --bg-surface: #ffffff;
    --text-main: #2D3748;
    /* Dark, sharp gray */
    --text-muted: #718096;
    --border-light: #cbd5e0;
    /* Stronger border */
    --shadow-card: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    /* Visible Shadow */
    --shadow-hover: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

body {
    background-color: var(--bg-body);
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--brand-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    color: var(--brand-accent);
}

/* Hero Section - Direct & Bold */
.hero-section {
    padding: 6rem 1rem 4rem;
    text-align: center;
    background-color: var(--bg-body);
    /* Seamless */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1a202c;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #4a5568;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.5;
}

.gradient-text {
    color: var(--brand-color);
    /* Solid color for authority */
    background: none;
    -webkit-text-fill-color: initial;
}

/* Tool Grid Cards */
.modern-tool-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    transition: all 0.2s ease-in-out;
    border: 1px solid #e2e8f0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.modern-tool-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-accent);
    background: #ffffff;
}

/* Icon - Key Feature */
.tool-card-icon {
    font-size: 2rem;
    color: var(--brand-accent);
    margin-bottom: 1rem;
    height: 60px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e7ff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.modern-tool-card:hover .tool-card-icon {
    transform: scale(1.05);
    background: var(--brand-color);
    color: #ffffff;
}

.tool-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.tool-card-description {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 400;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Section Headers */
.section-header {
    margin-bottom: 2rem;
    text-align: center;
    /* Center category headers */
    position: relative;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    display: inline-block;
    padding: 0 1rem;
    background: var(--bg-body);
    /* Mask line behind */
    position: relative;
    z-index: 1;
}

.section-header::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #cbd5e0;
    z-index: 0;
}

/* Module View Tweaks */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    border-radius: 8px;
    /* Sharper */
}

/* Feature Icons in Footer */
.feature-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--brand-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.btn-primary {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    /* Smaller radius */
}

.btn-primary:hover {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
}

/* Mobile */
@media (max-width: 768px) {
    .modern-tool-card {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.breadcrumb {
    background: none;
    padding: 0;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: '>';
}

/* Drag & Drop Zone */
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
}

.upload-zone.drag-over {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
}

.upload-icon {
    display: inline-block;
    width: 64px;
    height: 64px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%230d6efd" d="M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"/></svg>') no-repeat center center;
    margin-bottom: 1rem;
}

/* Preview Area */
.preview-content {
    max-height: 300px;
    overflow-y: auto;
    margin: 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.9rem;
}

/* Loading Spinner Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-border {
    animation: spin 1s linear infinite;
}

/* Toast Notifications */
.toast {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

/* Custom Button Styles */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-stats {
        flex-direction: row;
        gap: 0.75rem;
    }

    .stat-divider {
        width: 30px;
        height: 1px;
    }

    .section-title {
        font-size: 1.125rem;
    }

    .container {
        padding: 1rem;
    }

    .card {
        margin: 0;
        border-radius: 12px;
    }

    .btn-lg {
        width: 100%;
        margin-bottom: 1rem;
    }

    .preview-content {
        max-height: 200px;
    }

    .hero-section {
        padding: 1rem 1rem;
    }
}

/* Progress Bar Styles */
.upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.progress {
    height: 0.5rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    overflow: hidden;
}

/* Accordion Custom Styles */
.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

/* File Preview Controls */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-group-sm .btn.active {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

/* Validation Messages */
.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.was-validated .form-control:invalid~.invalid-feedback {
    display: block;
}

/* Custom Form Controls */
.form-select:disabled {
    background-color: #e9ecef;
    opacity: 0.8;
}