:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-top: 56px;
}

.hero-section {
    background: var(--primary-gradient);
    min-height: 100vh;
}

.auth-section {
    background: var(--primary-gradient);
    min-height: 100vh;
}

.member-section {
    background: var(--light-color);
    min-height: calc(100vh - 56px);
}

.history-section {
    background: var(--light-color);
    min-height: calc(100vh - 56px);
}

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

.generator-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.auth-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.auth-logo i {
    font-size: 2.5rem;
    color: #fff;
}

.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}

.style-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.style-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.style-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.style-card.vip-style {
    border-color: var(--warning-color);
}

.style-card.vip-style::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 30px 30px 0;
    border-color: transparent var(--warning-color) transparent transparent;
}

.style-card-body {
    text-align: center;
}

.shape-option {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.shape-option:hover {
    border-color: #6b7280;
    background: #f8f9fa;
}

.shape-option.selected {
    border-color: #4f46e5;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
}

.shape-option svg {
    width: 20px;
    height: 20px;
}

.style-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.style-points {
    font-size: 0.75rem;
    color: var(--success-color);
    font-weight: 500;
}

.style-desc {
    color: #6c757d;
    font-size: 0.75rem;
}

.vip-badge {
    display: inline-flex;
    align-items: center;
    background: var(--secondary-gradient);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    background: var(--primary-gradient);
}

.btn-primary:disabled {
    transform: none;
    box-shadow: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.qr-preview {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.qr-preview img {
    max-width: 100%;
    border-radius: 8px;
}

.feature-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.member-info-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.member-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.member-avatar i {
    font-size: 3rem;
    color: #fff;
}

.member-stats .stat-item h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0;
}

.vip-package-card {
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

.vip-package-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.vip-package-card.popular {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.vip-package-card .popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.vip-package-card .vip-header h6 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 16px;
}

.vip-package-card .vip-price {
    margin-bottom: 20px;
}

.vip-package-card .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.vip-package-card .period {
    color: #6c757d;
    font-size: 0.9rem;
}

.vip-package-card .vip-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.vip-package-card .vip-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.vip-package-card .vip-features li:last-child {
    border-bottom: none;
}

.history-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.history-thumb:hover {
    transform: scale(1.1);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control-lg {
    padding: 12px 16px;
    font-size: 1rem;
}

.card {
    border-radius: 12px;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table th {
    font-weight: 600;
    color: var(--dark-color);
    border-bottom-width: 1px;
}

.badge {
    font-weight: 500;
    padding: 6px 12px;
}

.toast {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.modal-content {
    border: none;
    border-radius: 16px;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-gradient);
}

.pagination .page-link:hover {
    background: rgba(102, 126, 234, 0.1);
}

.footer {
    margin-top: auto;
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 20px;
    }
    
    .styles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .generator-card {
        margin: 0 10px;
    }
    
    .vip-package-card {
        margin-bottom: 20px;
    }
    
    .member-info-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .styles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .style-card {
        padding: 8px;
    }
    
    .style-name {
        font-size: 0.85rem;
    }
    
    .auth-card {
        margin: 0 10px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.style-preview-img {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    display: block;
}

.style-zoom-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    z-index: 10;
}

.style-card:hover .style-zoom-icon {
    opacity: 1;
}

.style-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.style-modal-overlay.show {
    display: flex;
}

.style-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    padding: 10px;
}

.style-modal-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.style-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    transition: all 0.2s;
    z-index: 11;
}

.style-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.responsive-table {
    width: 100%;
}

@media (max-width: 768px) {
    .responsive-table thead {
        display: none;
    }
    
    .responsive-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 15px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .responsive-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #eee;
    }
    
    .responsive-table tbody td:last-child {
        border-bottom: none;
    }
    
    .responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #666;
        margin-right: 10px;
        flex-shrink: 0;
    }
    
    .responsive-table tbody td.action-cell {
        display: flex;
        justify-content: center;
        gap: 5px;
        padding-top: 10px;
        flex-wrap: wrap;
    }
    
    .responsive-table tbody td.action-cell::before {
        display: none;
    }
    
    .responsive-table tbody td img {
        max-width: 60px;
        max-height: 60px;
        border-radius: 4px;
    }
}
