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

:root {
    --primary: #667eea;
    --primary-dark: #5a6fd6;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1a1a2e;
    --gray-100: #f5f6fa;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-lg: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.6;
}

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

/* Header */
.site-header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary);
}

/* Announcement */
.announcement-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.75rem 0;
}

.announcement-bar .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.announcement-text {
    font-size: 0.875rem;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    color: var(--gray-500);
    font-size: 1.125rem;
}

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

.content-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-cover {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--gray-200);
    overflow: hidden;
}

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

.card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray-300);
}

.card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.badge-free {
    background: var(--success);
}

.badge-paid {
    background: var(--danger);
}

.badge-purchased {
    background: var(--info);
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.purchased-tag {
    color: var(--info);
    font-weight: 500;
}

/* Detail Page */
.detail-page {
    max-width: 900px;
    margin: 0 auto;
}

.detail-header {
    margin-bottom: 2rem;
}

.back-link {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: var(--primary);
}

.detail-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-description {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.content-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

.video-container {
    background: var(--gray-900);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.video-container video {
    width: 100%;
    display: block;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.image-gallery a {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
}

.image-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s;
}

.image-gallery a:hover img {
    transform: scale(1.05);
}

/* Paywall */
.paywall-section {
    position: relative;
}

.paywall-preview {
    position: relative;
    margin-bottom: 2rem;
}

.blur-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(transparent, var(--gray-100));
    pointer-events: none;
}

.paywall-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    margin: 0 auto;
}

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

.paywall-box h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.paywall-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 0.5rem;
}

.paywall-desc {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* Payment Page */
.payment-page {
    max-width: 600px;
    margin: 0 auto;
}

.payment-header {
    margin-bottom: 1.5rem;
}

.payment-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.order-info {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.order-info h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.order-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-row .label {
    color: var(--gray-500);
}

.order-row .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--danger);
}

.order-no {
    font-family: monospace;
    font-size: 1.125rem;
    color: var(--primary);
}

.payment-methods h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.method-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.method-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
}

.method-option input {
    display: none;
}

.method-option.active {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.method-icon {
    font-size: 2rem;
}

.method-name {
    font-weight: 500;
}

.qrcode-section {
    text-align: center;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.qrcode-wrapper {
    margin-bottom: 1rem;
}

.qrcode-wrapper img {
    max-width: 250px;
    border-radius: var(--radius);
}

.qrcode-placeholder {
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    color: var(--gray-500);
}

.qrcode-instructions {
    font-size: 0.875rem;
}

.instruction-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.instruction-amount {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.instruction-note {
    color: var(--warning);
    margin-bottom: 0.5rem;
}

.order-no-highlight {
    color: var(--primary);
    font-size: 1rem;
}

.payment-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.payment-tips h4 {
    margin-bottom: 0.5rem;
}

.payment-tips ul {
    list-style: none;
    color: var(--gray-600);
}

.payment-tips li {
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.payment-tips li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Pay Confirm */
.confirm-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto 2rem;
}

.query-form .form-group {
    margin-bottom: 1rem;
}

.query-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.query-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
}

.query-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.order-result {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.result-status {
    margin-bottom: 1rem;
}

.status-paid {
    color: var(--success);
    font-size: 1.25rem;
    font-weight: 600;
}

.status-pending {
    color: var(--warning);
    font-size: 1.25rem;
    font-weight: 600;
}

.status-refunded {
    color: var(--gray-500);
    font-size: 1.25rem;
}

.status-error {
    color: var(--danger);
    font-size: 1.125rem;
}

.result-details {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.result-details p {
    padding: 0.25rem 0;
}

.waiting-tip {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* FAQ */
.tips-section {
    max-width: 600px;
    margin: 0 auto;
}

.tips-section h3 {
    margin-bottom: 1rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "▼";
    float: right;
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
}

.faq-item p {
    padding: 0 1rem 1rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

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

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

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.empty-state p {
    color: var(--gray-500);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

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

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

.btn-success {
    background: var(--success);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Footer */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.25rem;
}

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

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.75rem;
    color: var(--gray-900);
}

.stat-info p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.dashboard-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-footer {
    margin-top: 1rem;
    text-align: center;
}

.dashboard-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.quick-link {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--gray-700);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

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

.quick-link i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: var(--gray-100);
}

.table-thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.no-image {
    color: var(--gray-400);
    font-size: 0.75rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.order-no-cell {
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.page-actions {
    margin-bottom: 1.5rem;
}

/* Form Styles */
.form-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.form-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

.form-help {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.current-file,
.current-files {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius);
}

.current-preview {
    max-width: 200px;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.current-file video {
    max-width: 300px;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.current-file-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.current-file-item img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
}

.page-header-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* QR Code Page */
.qrcode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.qrcode-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.qrcode-card h3 {
    margin-bottom: 1rem;
}

.qr-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.current-qrcode {
    margin-bottom: 1rem;
}

.current-qrcode img {
    max-width: 200px;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.qrcode-status {
    color: var(--success);
    font-size: 0.875rem;
}

.qrcode-placeholder {
    padding: 2rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.qrcode-placeholder i {
    font-size: 3rem;
    color: var(--gray-300);
}

.qrcode-placeholder p {
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* Alert */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-600);
}

.empty-text {
    color: var(--gray-500);
    text-align: center;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .qrcode-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-card {
        padding: 1.5rem;
    }
    
    .method-options {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
