:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    --surface-light: #ffffff;
    --surface-dark: #1e1e2f;
    --bg-light: #f3f4f6;
    --bg-dark: #121212;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-light: #e5e7eb;
    --border-dark: #374151;
    --accent: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-4,
.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* --- Hero Section --- */
header {
    background: var(--primary-gradient);
    color: white;
    padding: 4rem 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(118, 75, 162, 0.2);
}

header h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 2.5rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }
}

/* More Tools Grid */
.tool-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--bs-body-color);
    display: block;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary);
}

.tool-card .icon-box {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.tool-card h5 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tool-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #6c757d;
}


/* --- Drop Area --- */
#drop-area {
    background: var(--surface-light);
    border: 3px dashed var(--border-light);
    border-radius: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

#drop-area:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

#drop-area.highlight {
    border-color: var(--accent);
    background-color: rgba(139, 92, 246, 0.05);
}

/* --- Cards & UI Elements --- */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    background: var(--surface-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.form-control,
.form-select,
.form-range {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* --- Buttons --- */
.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd1 0%, #66418c 100%);
    transform: translateY(-1px);
}

/* --- List View for Results --- */
.result-item {
    background: var(--surface-light);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-light);
}

.result-item img.thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-right: 1rem;
}

.result-info {
    flex-grow: 1;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- Dark Mode --- */
body.dark-mode {
    background-color: var(--bg-dark);
    color: #e5e7eb;
}

.dark-mode #drop-area {
    background: var(--surface-dark);
    border-color: var(--border-dark);
}

.dark-mode .card,
.dark-mode .result-item,
.dark-mode .bg-light,
.dark-mode .accordion-item,
.dark-mode .list-group-item {
    background-color: var(--surface-dark) !important;
    border-color: var(--border-dark);
    color: #e5e7eb;
}

.dark-mode .form-control,
.dark-mode .form-select {
    background-color: #2c2c3e;
    border-color: var(--border-dark);
    color: white;
}

.dark-mode .accordion-button {
    background-color: #2c2c3e;
    color: white;
}

.dark-mode .accordion-button:not(.collapsed) {
    background-color: #3f3f5a;
}