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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #333;
    margin-bottom: 10px;
}

header p {
    color: #666;
    margin-bottom: 20px;
}

nav {
    display: flex;
    gap: 15px;
}

nav a {
    color: #667eea;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover {
    background: #f0f0f0;
}

main {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #e0e0e0;
    border-radius: 5px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

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

button[type="submit"],
.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

button[type="submit"]:hover,
.btn:hover {
    background: #5568d3;
}

.btn-primary {
    background: #764ba2;
}

.btn-primary:hover {
    background: #5f3a81;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-success {
    background: #28a745;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-danger {
    background: #dc3545;
}

.result-section {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
}

.result-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.result-content img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-info code {
    display: block;
    padding: 10px;
    background: white;
    border-radius: 5px;
    margin: 10px 0;
    word-break: break-all;
    font-size: 14px;
}

.download-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

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

.qr-card {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.qr-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: white;
    padding: 20px;
}

.qr-card-info {
    padding: 20px;
}

.qr-card-info h3 {
    margin-bottom: 10px;
    color: #333;
}

.url-truncate {
    color: #666;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 15px;
}

.qr-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.qr-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h2 {
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

.view-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.qr-large {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.download-section {
    margin-top: 20px;
}

.download-section h3 {
    margin-bottom: 15px;
}

.qr-details h2 {
    color: #333;
    margin-bottom: 30px;
}

.detail-group {
    margin-bottom: 20px;
}

.detail-group label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.detail-group p,
.detail-group code {
    color: #333;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-box h3 {
    color: #667eea;
    font-size: 32px;
    margin-bottom: 5px;
}

.stat-box p {
    color: #666;
    font-size: 14px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

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

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

table tr:hover {
    background: #f8f9fa;
}

.recent-scans {
    margin-top: 40px;
}

.recent-scans h3 {
    margin-bottom: 20px;
    color: #333;
}

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

.stat-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h3 {
    color: #667eea;
    font-size: 36px;
    margin-bottom: 10px;
}

.stat-card p {
    color: #666;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    height: 350px;
}

.chart-container h3 {
    margin-bottom: 15px;
    color: #333;
}

.chart-container canvas {
    max-height: 280px;
}

@media (max-width: 768px) {
    .result-content,
    .view-layout {
        grid-template-columns: 1fr;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Authentication Styles */
.auth-container {
    max-width: 500px;
    margin: 40px auto;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-box h2 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.btn-block {
    width: 100%;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.features-preview {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.features-preview h3 {
    color: #333;
    margin-bottom: 15px;
}

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

.features-preview li {
    color: #666;
    padding: 8px 0;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 10px;
    position: relative;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error, .alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.close-btn:hover {
    opacity: 1;
}

/* Premium Badge */
.premium-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.premium-badge-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Dashboard Styles */
.dashboard-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.dashboard-header h2 {
    color: #333;
    margin-bottom: 5px;
}

.dashboard-header p {
    color: #666;
}

.upgrade-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
}

.upgrade-banner h3 {
    margin-bottom: 10px;
}

.upgrade-banner p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.upgrade-banner .btn {
    background: white;
    color: #667eea;
}

.upgrade-banner .btn:hover {
    background: #f0f0f0;
}

.dashboard-section {
    margin-bottom: 40px;
}

.dashboard-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.qr-card-small {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qr-card-small img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: white;
    padding: 15px;
}

.qr-stats-small {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
}

.qr-actions-small {
    display: flex;
    gap: 8px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.action-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-card h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.action-card p {
    color: #666;
}

/* Account Styles */
.account-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.account-container h2 {
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.account-section {
    margin-bottom: 40px;
}

.account-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.info-item label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.info-item p {
    color: #333;
    font-size: 16px;
}

.password-form {
    max-width: 500px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.page-header p {
    color: #666;
    margin-bottom: 15px;
}

.quota-display {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quota-display p {
    margin: 0;
    color: #333;
}

/* Custom Slug Input */
.slug-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background: white;
}

.slug-prefix {
    background: #f8f9fa;
    padding: 10px 12px;
    color: #666;
    font-size: 14px;
    border-right: 1px solid #ddd;
    white-space: nowrap;
}

.slug-input-wrapper input {
    border: none;
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
}

.slug-input-wrapper input:focus {
    outline: none;
    box-shadow: none;
}

/* Header Updates */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    margin: 0;
}

nav {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 20px;
    margin-top: 40px;
}

footer p {
    margin: 0;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav {
        margin-top: 15px;
    }
    
    .auth-box {
        padding: 30px 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Pricing Page */
.pricing-header {
    text-align: center;
    margin-bottom: 50px;
}

.pricing-header h1 {
    color: #333;
    font-size: 36px;
    margin-bottom: 10px;
}

.pricing-header p {
    color: #666;
    font-size: 18px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto 60px;
}

.pricing-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.pricing-card.featured {
    border: 3px solid #667eea;
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: 20px;
    right: -35px;
    background: #667eea;
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pricing-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.pricing-card-header h2 {
    margin: 0 0 20px;
    font-size: 24px;
}

.price {
    margin-bottom: 10px;
}

.price .amount {
    font-size: 48px;
    font-weight: 700;
}

.price .period {
    font-size: 18px;
    opacity: 0.9;
}

.pricing-card-header .subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.pricing-card-body {
    padding: 30px;
    flex: 1;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item.disabled {
    opacity: 0.5;
}

.feature-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    color: #667eea;
}

.feature-item.disabled .feature-icon {
    color: #999;
}

.pricing-card-footer {
    padding: 20px 30px 30px;
}

.pricing-card-footer .btn {
    width: 100%;
    text-align: center;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
}

/* Comparison Table */
.comparison-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.comparison-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.comparison-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.comparison-table td {
    color: #666;
}

.comparison-table .premium-col {
    background: #f0f4ff;
    color: #667eea;
    font-weight: 600;
}

/* FAQ Section */
.faq-section {
    max-width: 900px;
    margin: 60px auto;
}

.faq-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.faq-item {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    color: #333;
    margin: 0 0 15px;
    font-size: 18px;
}

.faq-item p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}
