/* ========== CSS Variables ========== */
:root {
    --primary-color: #14b8a6;
    --primary-dark: #0d9488;
    --primary-light: #5eead4;
    --secondary-color: #0891b2;
    --accent-color: #00b894;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    --sidebar-bg: #111827;
    --sidebar-text: #e5e7eb;
    --sidebar-text-muted: #9ca3af;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Reset & Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== Burger Menu Button (Mobile Only) ========== */
.burger-menu {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    box-shadow: 0 3px 12px rgba(20, 184, 166, 0.35), 0 1px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.burger-menu:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.burger-menu:active {
    transform: translateY(0);
}

.burger-menu span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.burger-menu span:nth-child(1) {
    width: 22px;
}

.burger-menu span:nth-child(2) {
    width: 18px;
}

.burger-menu span:nth-child(3) {
    width: 22px;
}

.burger-menu:hover span:nth-child(2) {
    width: 22px;
}

.burger-menu.active {
    background: linear-gradient(135deg, #10b981, #059669);
    transform: rotate(90deg);
}

.burger-menu.active:hover {
    transform: rotate(90deg) translateY(-2px);
}

.burger-menu.active span {
    width: 22px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ========== Top Bar (Minimized) ========== */
.top-bar {
    display: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.75rem 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
}

.logo svg {
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Language Selector Wrapper */
.language-selector-wrapper {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    z-index: 100;
}

/* Language Selector Button */
.language-selector-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 200px;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.language-selector-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.language-selector-btn:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.language-selector-btn svg {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.language-selector-wrapper.active .language-selector-btn svg {
    transform: rotate(180deg);
}

/* Language Dropdown */
.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.language-selector-wrapper.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Language Options */
.language-option {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    white-space: nowrap;
}

.language-option:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.language-option:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.language-option:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.language-option.active {
    background: rgba(20, 184, 166, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* ========== Main Layout ========== */
.main-layout {
    display: flex;
}

/* ========== Sidebar (Dark) ========== */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: none;
    overflow-y: auto;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-content {
    padding: 0;
}

.search-box {
    padding: 0 1.75rem 1.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.search-box input::placeholder {
    color: var(--sidebar-text-muted);
}

/* ========== Tool Navigation (Dark) ========== */
.tool-navigation {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 1.25rem 1.5rem;
}

.tool-category-header {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-text-muted);
    padding: 1.25rem 1.25rem 0.5rem;
    margin-top: 1rem;
    opacity: 0.7;
}

.tool-category-header:first-child {
    margin-top: 0;
}

.tool-nav-item {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--sidebar-text-muted);
    transition: var(--transition);
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    line-height: 1.4;
}

.tool-nav-item > span:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 1rem;
    opacity: 0.8;
}

.tool-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-text);
    border-radius: var(--radius-md);
}

.tool-nav-item:hover > span:first-child {
    opacity: 1;
}

.tool-nav-item.active {
    background: rgba(0, 184, 148, 0.12);
    color: var(--accent-color);
    font-weight: 600;
    border-left: 3px solid var(--accent-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.tool-nav-item.active > span:first-child {
    opacity: 1;
}

.tool-nav-item.hidden {
    display: none;
}

/* ========== Content Area ========== */
.content-area {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem 3rem 0;
    overflow-y: auto;
    position: relative;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto 0;
}

/* ========== Tool Card ========== */
.tool-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 0;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.tool-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.tool-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tool-header p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tool-body {
    margin-bottom: 0;
}

/* ========== Form Elements ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-input[type="file"] {
    padding: 0.625rem;
    cursor: pointer;
}

.form-input[type="color"] {
    height: 60px;
    cursor: pointer;
    padding: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ========== Buttons (PrimeNG Style) ========== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-ghost {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-ghost:hover {
    background: rgba(20, 184, 166, 0.08);
    transform: translateY(-1px);
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ========== Results Area ========== */
.result-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.result-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.result-item {
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.result-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========== Stats Grid ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.stat-card {
    background: var(--bg-primary);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ========== Tags/Hashtags ========== */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========== Preview Area ========== */
.preview-area {
    margin-top: 1.5rem;
    margin-bottom: 0;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-area img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: var(--radius-md);
    object-fit: contain;
}

/* Alle Bilder in Containern begrenzen */
.result-image,
.thumbnail-preview,
.processed-image,
.downloaded-image,
.generated-image {
    max-width: 100% !important;
    max-height: 400px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: var(--radius-md);
}

/* Container für Bilder */
.result-container,
.preview-container,
.image-container {
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
}

/* Background Remover Container */
.processed-image-container {
    max-width: 100% !important;
    max-height: 500px !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.processed-image-container img {
    max-width: 100% !important;
    max-height: 400px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* ========== Alert Messages ========== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 0;
    font-size: 0.875rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* ========== Loading Spinner ========== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.download-section.loading {
    position: relative;
    overflow: hidden;
}

.download-section.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    pointer-events: none;
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .tool-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Show burger menu on mobile */
    .burger-menu {
        display: flex;
    }
    
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 280px;
        position: fixed;
        top: 0;
        bottom: 0;
        border-right: none;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
        transform: translateX(0);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }
    
    .sidebar.mobile-closed {
        transform: translateX(-100%);
    }
    
    .logo {
        padding: 1.25rem 1.5rem;
    }
    
    .logo h1 {
        font-size: 1rem;
    }
    
    .sidebar-content {
        padding-bottom: 1.5rem;
    }
    
    .search-box {
        padding: 0 1.5rem 1rem;
        margin-bottom: 0.75rem;
    }
    
    .tool-navigation {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.5rem;
        padding: 0 1.25rem 1.5rem;
    }
    
    .tool-nav-item {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
        text-align: center;
        flex-direction: column;
        gap: 0.375rem;
        border-left: none;
    }
    
    .tool-nav-item.active {
        border-left: none;
        border-top: 3px solid var(--accent-color);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        background: rgba(0, 184, 148, 0.15);
    }
    
    .content-area {
        margin-left: 0;
        padding: 5rem 1.25rem 1.5rem;
    }
    
    .language-selector-wrapper {
        top: 1rem;
        right: 1rem;
    }
    
    .tool-card {
        padding: 1.75rem;
    }
    
    .tool-header h2 {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tool-navigation {
        grid-template-columns: 1fr;
    }
    
    .currency-swap-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .swap-button {
        width: 100%;
        border-radius: var(--radius-md);
        margin: 0.5rem 0;
    }
    
    .swap-button:hover {
        transform: scale(1.02);
    }
}

/* ========== Scrollbar Styling ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.sidebar ::-webkit-scrollbar-track {
    background: var(--sidebar-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.sidebar ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ========== Currency Swap Button ========== */
.currency-swap-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.currency-swap-container .form-group {
    margin-bottom: 0;
}

.swap-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
    margin-top: 1.75rem;
}

.swap-button:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.4);
}

.swap-button:active {
    transform: rotate(180deg) scale(1);
}

.swap-button svg {
    width: 24px;
    height: 24px;
    transition: var(--transition);
}

/* ========== Utility Classes ========== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ========== YouTube-Style Video Downloader ========== */
.video-downloader-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0 0;
}

.video-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(147, 51, 234, 0.08));
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.video-title {
    font-size: 2.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.25rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.video-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
    opacity: 0.9;
}

.platform-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(10px);
}

.platform-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

.platform-icon svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.platform-icon[data-platform="YouTube"] {
    background: #ff0000;
    color: white;
}

.platform-icon[data-platform="Instagram"] {
    /* Smooth Instagram-like gradient without visible corner clipping */
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: white;
}

.platform-icon[data-platform="Facebook"] {
    background: #1877f2;
    color: white;
}

.platform-icon[data-platform="X"] {
    background: #000000;
    color: white;
}

.platform-icon[data-platform="TikTok"] {
    background: #000000;
    color: white;
}

.platform-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25), 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.platform-icon:hover svg {
    transform: scale(1.1);
}

.platform-icon.active {
    transform: scale(1.05);
    /* Outer ring instead of inner border to avoid cutting the gradient edge */
    box-shadow: 0 0 0 3px #3b82f6, 0 0 0 7px rgba(59, 130, 246, 0.2);
}

.url-input-container {
    margin-bottom: 2.5rem;
}

.url-input {
    width: 100%;
    padding: 1.5rem 2rem;
    border: 3px solid var(--border-color);
    border-radius: 16px;
    font-size: 1.25rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12), 0 0 0 0 rgba(59, 130, 246, 0.3);
    animation: gentle-glow 3s ease-in-out infinite;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 8px 32px rgba(20, 184, 166, 0.2), 0 0 0 6px rgba(20, 184, 166, 0.15);
    background: var(--bg-primary);
    transform: translateY(-2px);
    animation: none;
}

.url-input::placeholder {
    color: var(--text-tertiary);
    font-style: italic;
}

@keyframes gentle-glow {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12), 0 0 0 0 rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 8px 32px rgba(59, 130, 246, 0.18), 0 0 20px rgba(59, 130, 246, 0.2);
    }
}

.download-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 0;
    margin-top: 3rem;
}

.download-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(147, 51, 234, 0.03));
    border-radius: 20px;
    padding: 2.5rem;
    border: 2px solid rgba(59, 130, 246, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.download-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
}

.download-section:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.section-icon.video-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.section-icon.image-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
}

.option-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.download-btn {
    padding: 1rem 1.5rem;
    border: 2px solid transparent; /* keep equal height for solid vs outline */
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.download-btn.primary {
    background: linear-gradient(to bottom, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
    border: none;
}

.download-btn.primary:hover {
    background: linear-gradient(to bottom, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

.download-btn.secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color); /* uses base 2px from .download-btn */
    box-shadow: none;
}

.download-btn.secondary:hover {
    background: rgba(20, 184, 166, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.15);
}

.download-btn:disabled,
.download-btn.inactive {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    border: 2px solid #e5e7eb !important;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
    transform: none !important;
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

/* Responsive Design for Video Downloader */
@media (max-width: 768px) {
    .video-title {
        font-size: 2rem;
    }
    
    .video-description {
        font-size: 1rem;
    }
    
    .platform-icons {
        gap: 1rem;
    }
    
    .platform-icon {
        width: 50px;
        height: 50px;
    }
    
    .platform-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .download-options {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .download-section {
        padding: 1.5rem;
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
    
    .section-icon {
        width: 40px;
        height: 40px;
    }
    
    .section-header h3 {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .video-downloader-container {
        padding: 1rem 0;
    }
    
    .video-title {
        font-size: 1.75rem;
    }
    
    .platform-icons {
        gap: 0.75rem;
    }
    
    .platform-icon {
        width: 45px;
        height: 45px;
    }
    
    .platform-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .url-input {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .download-section {
        padding: 1.25rem;
    }
    
    .download-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* ========== Custom Currency Dropdown ========== */
.custom-dropdown {
    position: relative;
}

.custom-dropdown-input {
    cursor: pointer;
    user-select: none;
    background: white;
    position: relative;
}

.custom-dropdown-input:after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    pointer-events: none;
}

.custom-dropdown-list {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 400px;
    overflow: hidden;
}

.custom-dropdown-search {
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
    outline: none;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.custom-dropdown-search:focus {
    border-bottom-color: var(--primary-color);
}

.custom-dropdown-options {
    max-height: 340px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.currency-category {
    padding: 0.75rem 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.currency-option {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.currency-option:hover {
    background: var(--bg-tertiary);
}

.currency-flag {
    font-size: 1.5rem;
    margin-right: 0.875rem;
}

.currency-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.currency-code {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.currency-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Scrollbar styling for dropdown */
.custom-dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-options::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.custom-dropdown-options::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.custom-dropdown-options::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ========== Footer Styles ========== */
.main-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #e2e8f0;
    padding: 2rem 2rem 1.5rem;
    margin-top: 5rem;
    margin-left: 280px;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color)) 1;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(20, 184, 166, 0.3) 20%, 
        rgba(8, 145, 178, 0.3) 50%, 
        rgba(0, 184, 148, 0.3) 80%, 
        transparent 100%
    );
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.footer-section h4 {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.footer-section p {
    color: #cbd5e1;
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.875rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.footer-section ul li a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-8px);
    transition: var(--transition);
    color: var(--primary-color);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.footer-section ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-contact {
    margin-top: 1.5rem;
}

.footer-contact p {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact strong {
    color: #ffffff;
    font-weight: 600;
}

.footer-social p {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    text-align: center;
    position: relative;
}

.footer-bottom p {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ========== Modal Styles ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-out;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
    position: relative;
    margin-top: 2rem;
}

/* Modal Scrollbar Styling */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 2.5rem;
    font-size: 1rem;
    line-height: 1.8;
}

.modal-body h3 {
    color: var(--text-primary);
    font-size: 1.375rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.modal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.modal-body ul li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

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

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

/* Responsive Footer */
@media (max-width: 768px) {
    .main-footer {
        padding: 2rem 1.5rem 1.5rem;
        margin-left: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section h3 {
        font-size: 1.375rem;
    }
    
    .footer-section h4 {
        font-size: 1.0625rem;
    }
    
    .modal-content {
        margin-top: 1rem;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 2rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .modal-body h3 {
        font-size: 1.25rem;
    }
}

/* ========== Cookie Banner ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cookie-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.cookie-icon svg {
    width: 24px;
    height: 24px;
}

.cookie-text {
    flex: 1;
    color: #e2e8f0;
}

.cookie-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.cookie-text p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0;
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.cookie-text a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.cookie-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.4);
}

.cookie-btn-secondary {
    background: transparent;
    color: #cbd5e1;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

/* Responsive Cookie Banner */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.25rem 1.5rem;
    }
    
    .cookie-icon {
        width: 40px;
        height: 40px;
    }
    
    .cookie-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .cookie-text h3 {
        font-size: 1rem;
    }
    
    .cookie-text p {
        font-size: 0.875rem;
    }
    
    .cookie-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-content {
        padding: 1rem;
    }
    
    .cookie-icon {
        width: 36px;
        height: 36px;
    }
    
    .cookie-icon svg {
        width: 18px;
        height: 18px;
    }
}


