/* QR Code Generator - Enhanced Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Enhanced Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 20px 30px;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    color: #4a5568;
    text-align: center;
    margin-bottom: 15px;
    font-size: 2.8em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav a, .nav-links a, .logout-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav a:hover, .nav-links a:hover, .logout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

/* Enhanced Card Styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.generator-card {
    max-width: 900px;
    margin: 0 auto;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 45px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 35px;
    color: #4a5568;
    font-size: 2.2em;
    font-weight: 700;
}

/* Enhanced Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #4a5568;
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: white;
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
    font-family: inherit;
}

/* Enhanced Quality Slider */
.quality-slider {
    margin: 25px 0;
    padding: 20px;
    background: rgba(247, 250, 252, 0.8);
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.slider-container {
    position: relative;
    margin: 15px 0;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #e2e8f0, #667eea);
    outline: none;
    opacity: 0.8;
    transition: opacity 0.3s;
    cursor: pointer;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Enhanced Button Styles */
.btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.4);
}

.btn-small {
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 10px;
}

/* Enhanced QR Code Display */
.qr-result {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: rgba(247, 250, 252, 0.8);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.qr-code-container {
    background: white;
    padding: 25px;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.qr-code-container img {
    border-radius: 10px;
}

.download-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* Enhanced QR Code History */
.qr-history {
    margin-top: 50px;
}

.qr-history h3 {
    margin-bottom: 25px;
    color: #4a5568;
    font-size: 1.8em;
    font-weight: 700;
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.qr-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

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

.qr-item img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.qr-item-content {
    margin-bottom: 15px;
}

.qr-item-meta {
    font-size: 13px;
    color: #718096;
    margin-bottom: 20px;
    line-height: 1.6;
}

.qr-item-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Enhanced Management Table */
.management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.management-header h2 {
    color: #4a5568;
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
}

.table-container {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

th, td {
    padding: 18px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.qr-preview-cell {
    width: 80px;
}

.qr-preview-cell img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-preview-placeholder {
    width: 60px;
    height: 60px;
    background: #f7fafc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    font-size: 12px;
    border: 1px solid #e2e8f0;
}

.content-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quality-badge {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    color: #4a5568;
}

.actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 160px;
}

/* Enhanced Alert Messages */
.alert {
    padding: 18px 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4);
    color: #22543d;
    border-left-color: #38a169;
}

.alert-error {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    color: #742a2a;
    border-left-color: #e53e3e;
}

.alert-info {
    background: linear-gradient(135deg, #bee3f8, #90cdf4);
    color: #2a4365;
    border-left-color: #3182ce;
}

/* Enhanced Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 18px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2.8em;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #4a5568;
    font-size: 1.1em;
    font-weight: 500;
}

/* Enhanced Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
}

.pagination a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Enhanced Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #718096;
}

.empty-state-icon {
    font-size: 5em;
    margin-bottom: 25px;
    opacity: 0.7;
}

.empty-state h3 {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1.5em;
}

.empty-state p {
    margin-bottom: 30px;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2.2em;
    }
    
    .nav {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .card {
        padding: 25px;
    }
    
    .qr-grid {
        grid-template-columns: 1fr;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .management-header {
        flex-direction: column;
        text-align: center;
    }
    
    .actions-cell {
        flex-direction: column;
    }
    
    .table-container {
        font-size: 14px;
    }
    
    th, td {
        padding: 12px 8px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .pagination a {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* Enhanced Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none; }

/* Enhanced Content Type Icons */
.content-type-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

.content-type-icon.website {
    background: rgba(72, 187, 120, 0.1);
    color: #22543d;
}

/* Enhanced Action Buttons */
.action-btn {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.action-btn.download-png {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

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

.action-btn.delete {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.action-btn.view {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}