/* ImageToText Application Styles */

:root {
    --primary-color: #4a69bd;
    --primary-hover: #3a539b;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-active-bg: #34495e;
    --content-bg: #f4f7fa;
    --card-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #7f8c8d;
    --border-color: #e0e0e0;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --border-radius: 8px;
    --sidebar-width: 260px;
    --success-bg: #d4edda;
    --success-border: #c3e6cb;
    --success-text: #155724;
    --error-bg: #f8d7da;
    --error-border: #f5c6cb;
    --error-text: #721c24;
    --info-bg: #e0f2fe;
    --info-border: #7dd3fc;
    --info-text: #075985;
    --credit-color: #27ae60;
    --debit-color: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--content-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Page Content */
.page-content {
    padding: 2rem;
    max-width: 1400px;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.success-message {
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

.error-message {
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
}

.info-message {
    background-color: var(--info-bg);
    border: 1px solid var(--info-border);
    color: var(--info-text);
}

/* Dashboard Widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.widget {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.widget-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.widget h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.widget p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

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

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    display: inline-block;
    margin-left: 0.5rem;
}

.btn-danger {
    background-color: var(--debit-color);
}

/* Convert Container */
.convert-container {
    max-width: 900px;
    margin: 0 auto;
}

.status-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.balance-info,
.price-info {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.balance-info h3,
.price-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.balance-info p,
.price-info p {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.convert-form-card,
.result-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input[type="file"],
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.form-group input:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

.result-card textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: monospace;
    resize: vertical;
}

.download-options {
    margin-top: 1.5rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-download {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Wallet Container */
.wallet-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.balance-card,
.add-funds-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.balance-amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 1rem;
}

.history-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.table-responsive {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.history-table th,
.history-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.history-table th {
    background-color: var(--content-bg);
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge.credit {
    background-color: var(--success-bg);
    color: var(--success-text);
}

.badge.debit {
    background-color: var(--error-bg);
    color: var(--error-text);
}

.credit {
    color: var(--credit-color);
}

.debit {
    color: var(--debit-color);
}

/* Profile Container */
.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 2rem auto;
}

.profile-picture-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.profile-picture {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.profile-details {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.profile-details h2 {
    margin-bottom: 1rem;
}

.profile-details .balance {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-details p {
    margin-bottom: 0.75rem;
}

.profile-actions {
    margin-top: 2rem;
}

/* Auth Pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 450px;
    width: 100%;
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-container > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
    }

    .dashboard-widgets {
        grid-template-columns: 1fr;
    }

    .wallet-container {
        grid-template-columns: 1fr;
    }

    .page-content {
        padding: 1rem;
    }
}

/* ========================================
   ENHANCED DASHBOARD STYLES
   ======================================== */

/* Dashboard Welcome Section */
.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.welcome-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: linear-gradient(to right, #ffd89b, #19547b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    opacity: 0.95;
    font-size: 1.1rem;
}

.btn-primary-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: white;
    color: #667eea;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card-purple::before { background: linear-gradient(to right, #667eea, #764ba2); }
.stat-card-blue::before { background: linear-gradient(to right, #2196F3, #21CBF3); }
.stat-card-green::before { background: linear-gradient(to right, #11998e, #38ef7d); }
.stat-card-orange::before { background: linear-gradient(to right, #f2994a, #f2c94c); }

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-card-purple .stat-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #667eea;
}

.stat-card-blue .stat-icon {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 203, 243, 0.1));
    color: #2196F3;
}

.stat-card-green .stat-icon {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1), rgba(56, 239, 125, 0.1));
    color: #11998e;
}

.stat-card-orange .stat-icon {
    background: linear-gradient(135deg, rgba(242, 153, 74, 0.1), rgba(242, 201, 76, 0.1));
    color: #f2994a;
}

.stat-details h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.stat-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stat-link {
    display: inline-block;
    margin-top: 1rem;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.stat-link:hover {
    color: #764ba2;
    transform: translateX(3px);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.view-all {
    color: #667eea;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.view-all:hover {
    color: #764ba2;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #667eea;
}

.action-success {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1), rgba(56, 239, 125, 0.1));
    color: #11998e;
}

.action-info {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 203, 243, 0.1));
    color: #2196F3;
}

.action-warning {
    background: linear-gradient(135deg, rgba(242, 153, 74, 0.1), rgba(242, 201, 76, 0.1));
    color: #f2994a;
}

.action-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: currentColor;
}

.action-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
}

.action-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.action-content p {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Activity List */
.activity-list {
    padding: 1rem 1.5rem 1.5rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.activity-item:hover {
    background: #f8f9fa;
}

.activity-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.activity-details {
    flex-grow: 1;
}

.activity-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.activity-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.activity-amount {
    font-size: 1rem;
    font-weight: 700;
}

.amount-credit {
    color: var(--credit-color);
}

.amount-debit {
    color: var(--debit-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-sm {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #667eea;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-sm:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-welcome {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .welcome-content h1 {
        font-size: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .activity-item {
        flex-wrap: wrap;
    }

    .activity-amount {
        width: 100%;
        text-align: right;
    }
}

/* ========================================
   CONVERSION PAGE STYLES
   ======================================== */

/* Page Header */
.convert-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.header-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-content h1 svg {
    color: #667eea;
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.wallet-quick-view .balance-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Alert Banners */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Confirmation Container */
.confirmation-container {
    display: flex;
    justify-content: center;
    padding: 3rem 1rem;
}

.confirmation-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.confirmation-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    color: white;
}

.confirmation-card h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.confirmation-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.highlight {
    background: linear-gradient(to right, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    margin: 0 -1rem;
    padding: 1rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.button-group-center {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-confirm, .btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-confirm {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
}

/* Convert Layout */
.convert-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Info Panel */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.info-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.info-icon.purple {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    color: #667eea;
}

.info-icon.blue {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(33, 203, 243, 0.15));
    color: #2196F3;
}

.info-card h3 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.info-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.info-link:hover {
    color: #764ba2;
}

.info-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.feature-list {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.feature-list h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-list li svg {
    color: #28a745;
    flex-shrink: 0;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
    transition: all 0.3s;
    cursor: pointer;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.upload-area:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
}

.upload-area.drag-over {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    transform: scale(1.02);
}

.upload-icon svg {
    color: #667eea;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.upload-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.upload-specs {
    display: inline-flex;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.upload-specs span {
    font-weight: 500;
}

/* Preview Container */
.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.preview-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.preview-item:hover {
    transform: translateY(-5px);
}

.preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.preview-info {
    padding: 0.75rem;
    background: #f8f9fa;
}

.preview-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.preview-size {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Upload Button */
.btn-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 2rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-upload:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-upload:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-upload.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.spin {
    animation: spin 1s linear infinite;
}

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

/* Insufficient Funds */
.insufficient-funds {
    text-align: center;
    padding: 2rem;
    background: #fff3cd;
    border-radius: 12px;
    margin-top: 1.5rem;
    border-left: 4px solid #ffc107;
}

.insufficient-funds svg {
    color: #856404;
    margin-bottom: 1rem;
}

.insufficient-funds p {
    color: #856404;
    margin-bottom: 1rem;
    font-weight: 500;
}

.btn-add-funds {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #ffc107;
    color: #212529;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-add-funds:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
}

.results-header {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.results-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 0.5rem;
}

.results-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.results-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.text-output {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.output-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.btn-icon {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

#extracted-text {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    background: white;
}

.download-panel {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 12px;
    padding: 1.5rem;
}

.download-panel h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.download-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.download-btn.txt {
    border-left: 4px solid #17a2b8;
}

.download-btn.doc {
    border-left: 4px solid #28a745;
}

.download-btn svg {
    flex-shrink: 0;
}

.download-btn.txt svg {
    color: #17a2b8;
}

.download-btn.doc svg {
    color: #28a745;
}

.download-btn span {
    display: flex;
    flex-direction: column;
}

.download-btn strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.download-btn small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: -100px;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: bottom 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.toast.show {
    bottom: 2rem;
}

.toast-success {
    border-left: 4px solid #28a745;
    color: #155724;
}

.toast-error {
    border-left: 4px solid #dc3545;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .convert-layout {
        grid-template-columns: 1fr;
    }

    .info-panel {
        flex-direction: row;
        overflow-x: auto;
    }

    .info-card, .feature-list {
        min-width: 250px;
    }

    .results-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .convert-page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .header-content h1 {
        font-size: 1.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .upload-icon svg {
        width: 60px;
        height: 60px;
    }

    .confirmation-card {
        padding: 2rem 1.5rem;
    }

    .button-group-center {
        flex-direction: column;
    }

    .btn-confirm, .btn-cancel {
        width: 100%;
    }
}

/* ========================================
   WALLET PAGE STYLES
   ======================================== */

/* Wallet Page Header */
.wallet-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.wallet-page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wallet-page-header h1 svg {
    color: #667eea;
}

/* Wallet Stats Grid */
.wallet-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.wallet-stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.wallet-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.wallet-stat-card.primary::before {
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.wallet-stat-card.success::before {
    background: linear-gradient(to bottom, #11998e, #38ef7d);
}

.wallet-stat-card.danger::before {
    background: linear-gradient(to bottom, #eb3349, #f45c43);
}

.wallet-stat-card.info::before {
    background: linear-gradient(to bottom, #2196F3, #21CBF3);
}

.wallet-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-icon-circle {
    width: 65px;
    height: 65px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wallet-stat-card.primary .stat-icon-circle {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    color: #667eea;
}

.wallet-stat-card.success .stat-icon-circle {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.15), rgba(56, 239, 125, 0.15));
    color: #11998e;
}

.wallet-stat-card.danger .stat-icon-circle {
    background: linear-gradient(135deg, rgba(235, 51, 73, 0.15), rgba(244, 92, 67, 0.15));
    color: #eb3349;
}

.wallet-stat-card.info .stat-icon-circle {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(33, 203, 243, 0.15));
    color: #2196F3;
}

.stat-info {
    flex: 1;
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Wallet Main Grid */
.wallet-main-grid {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Add Funds Section */
.add-funds-section,
.transaction-history-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2 svg {
    color: #667eea;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Amount Selector */
.amount-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.quick-amounts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.quick-amount-btn {
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.quick-amount-btn:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: #667eea;
    transform: translateY(-2px);
}

.quick-amount-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}

.custom-amount {
    margin-bottom: 1.5rem;
}

.amount-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 1.25rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: #667eea;
}

.amount-input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.amount-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.amount-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.exchange-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: #e3f2fd;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #1976d2;
}

.exchange-info svg {
    flex-shrink: 0;
}

.btn-add-funds {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.125rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-add-funds:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.payment-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.payment-status.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.payment-status.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.payment-status.loading {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Payment Methods */
.payment-methods {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.methods-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.methods-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.method-badge {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Transaction History */
.transactions-list {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.transactions-list::-webkit-scrollbar {
    width: 6px;
}

.transactions-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.transaction-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.transaction-item.credit {
    border-left-color: #28a745;
}

.transaction-item.debit {
    border-left-color: #dc3545;
}

.transaction-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.transaction-item.credit .transaction-icon {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(56, 239, 125, 0.15));
    color: #28a745;
}

.transaction-item.debit .transaction-icon {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15), rgba(244, 92, 67, 0.15));
    color: #dc3545;
}

.transaction-details {
    flex: 1;
}

.transaction-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.transaction-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.transaction-amount {
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.transaction-amount.credit {
    color: #28a745;
}

.transaction-amount.debit {
    color: #dc3545;
}

/* Empty State */
.empty-transactions {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-transactions p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-weight: 500;
}

.empty-transactions small {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .wallet-main-grid {
        grid-template-columns: 1fr;
    }

    .add-funds-section {
        max-width: 600px;
        margin: 0 auto;
    }
}

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

    .quick-amounts {
        grid-template-columns: 1fr;
    }

    .wallet-stat-card {
        flex-direction: row;
    }

    .methods-icons {
        flex-direction: column;
    }

    .method-badge {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .wallet-page-header h1 {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .wallet-stat-card {
        padding: 1.25rem;
    }

    .stat-icon-circle {
        width: 55px;
        height: 55px;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .transaction-item {
        flex-wrap: wrap;
    }

    .transaction-amount {
        width: 100%;
        text-align: right;
        margin-top: 0.5rem;
    }
}

/* ========================================
   HISTORY PAGE STYLES
   ======================================== */

/* History Page Header */
.history-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.history-page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.history-page-header h1 svg {
    color: #667eea;
}

.btn-new-conversion {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-new-conversion:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* History Stats Grid */
.history-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.history-stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.history-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.history-stat-card.purple::before {
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.history-stat-card.blue::before {
    background: linear-gradient(to bottom, #2196F3, #21CBF3);
}

.history-stat-card.green::before {
    background: linear-gradient(to bottom, #11998e, #38ef7d);
}

.history-stat-card.orange::before {
    background: linear-gradient(to bottom, #f2994a, #f2c94c);
}

.history-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-icon-wrapper {
    width: 65px;
    height: 65px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-stat-card.purple .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    color: #667eea;
}

.history-stat-card.blue .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(33, 203, 243, 0.15));
    color: #2196F3;
}

.history-stat-card.green .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.15), rgba(56, 239, 125, 0.15));
    color: #11998e;
}

.history-stat-card.orange .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(242, 153, 74, 0.15), rgba(242, 201, 76, 0.15));
    color: #f2994a;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

/* History Controls */
.history-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    left: 1.25rem;
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-controls {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:hover {
    border-color: #667eea;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Conversions Grid */
.conversions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.conversion-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.conversion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.conversion-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
}

.conversion-id {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.conversion-id svg {
    color: #667eea;
}

.conversion-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.conversion-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
}

.conversion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: var(--text-secondary);
    opacity: 0.5;
}

.conversion-content {
    padding: 1.25rem;
    flex: 1;
}

.conversion-filename {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.conversion-filename svg {
    flex-shrink: 0;
}

.conversion-preview {
    margin-bottom: 1rem;
}

.preview-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.word-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.word-count svg {
    flex-shrink: 0;
}

.conversion-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 2px solid var(--border-color);
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn.view {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.action-btn.view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn.copy {
    background: #f8f9fa;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.action-btn.copy:hover {
    background: #e9ecef;
    border-color: #667eea;
}

/* Empty State */
.empty-history {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-history h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-history p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-start-converting {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-start-converting:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    padding: 0.5rem;
    border-radius: 8px;
}

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

.modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

#modalText {
    width: 100%;
    height: 400px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--border-color);
}

.btn-modal-copy {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modal-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-modal-close {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modal-close:hover {
    background: #e9ecef;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .conversions-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .history-page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
    }

    .btn-new-conversion {
        width: 100%;
        justify-content: center;
    }

    .history-stats-grid {
        grid-template-columns: 1fr;
    }

    .history-controls {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .conversions-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
    }
}

@media (max-width: 640px) {
    .history-page-header h1 {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .history-stat-card {
        padding: 1.25rem;
    }

    .stat-icon-wrapper {
        width: 55px;
        height: 55px;
    }

    .conversion-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .modal-body {
        padding: 1rem;
    }

    #modalText {
        height: 300px;
    }

    .modal-footer {
        flex-direction: column;
    }
}

/* ============================================
   ANALYTICS CHARTS SECTION STYLES
   ============================================ */

.analytics-section {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(13, 110, 253, 0.3);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 400;
}

/* Charts Grid Layout */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Chart Cards */
.chart-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.chart-card-large {
    grid-column: span 1;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.chart-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.chart-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.chart-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-purple {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: #fff;
}

.badge-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.badge-blue {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: #fff;
}

.badge-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Chart Loading State */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #9ca3af;
    font-size: 1rem;
}

/* Chart Empty State */
.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #9ca3af;
}

.chart-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.chart-empty p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive Charts */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card-large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .analytics-section {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .chart-card {
        padding: 1rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Chart Animations */
@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-card {
    animation: chartFadeIn 0.6s ease-out;
}

.chart-card:nth-child(1) { animation-delay: 0.1s; }
.chart-card:nth-child(2) { animation-delay: 0.2s; }
.chart-card:nth-child(3) { animation-delay: 0.3s; }
.chart-card:nth-child(4) { animation-delay: 0.4s; }

/* Additional Analytics Stats */
.analytics-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.analytics-stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    color: #fff;
}

.analytics-stat-card h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.analytics-stat-card p {
    font-size: 0.875rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .analytics-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   CONVERSION TABS STYLES
   ============================================ */

.conversion-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 1.5rem 0;
    padding: 0 1rem;
}

.tab-btn {
    flex: 1;
    max-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tab-btn svg {
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.tab-btn.active {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.3);
    transform: translateY(-2px);
}

.tab-btn.active svg {
    transform: scale(1.1);
}

.tab-content {
    animation: tabFadeIn 0.4s ease-out;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Audio Upload Specific Styles */
#audioUploadArea {
    min-height: 300px;
}

.file-preview {
    background: #f8fafc;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.file-preview:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
}

.file-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.preview-info {
    text-align: center;
    width: 100%;
}

.preview-name {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.preview-size {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
}

@media (max-width: 768px) {
    .conversion-tabs {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tab-btn {
        max-width: 100%;
    }
}
