/* Admin Chinese Auction Styles */

.admin-section-header {
    margin-bottom: 2rem;
}

.admin-section-header h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.admin-section-header .section-description {
    color: #6b7280;
    font-size: 0.875rem;
}

.auction-management-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auction-tab-nav {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
    background: #f9fafb;
    padding: 0.25rem;
    border-radius: 0.5rem;
}

.auction-tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
    position: relative;
}

.auction-tab-btn:hover {
    color: #374151;
    background: #ffffff;
}

.auction-tab-btn.active {
    color: #2563eb;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auction-tab-panel {
    min-height: 400px;
}

.auction-tab-panel.hidden {
    display: none;
}

/* Prizes Section */
.prizes-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.75rem;
}

.prizes-section .section-header h4 {
    margin: 0;
    font-size: 1.25rem;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 0.75rem;
    border: 2px dashed #d1d5db;
}

.prize-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.prize-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.prize-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prize-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.prize-card:hover .prize-image img {
    transform: scale(1.02);
}

.prize-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prize-card:hover .prize-actions {
    opacity: 1;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon.edit-prize {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.btn-icon.edit-prize:hover {
    background: rgba(37, 99, 235, 1);
}

.btn-icon.delete-prize {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.btn-icon.delete-prize:hover {
    background: rgba(220, 38, 38, 1);
}

.prize-info {
    padding: 1.25rem;
}

.prize-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.prize-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.prize-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.prize-value {
    background: #dcfce7;
    color: #059669;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.ticket-price {
    background: #dbeafe;
    color: #2563eb;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.prize-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.75rem;
    color: #6b7280;
}

.tickets-sold {
    font-weight: 500;
    color: #2563eb;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

.form-group input[type="file"] {
    padding: 0.5rem;
}

/* Image Preview */
.image-preview {
    margin-top: 1rem;
    text-align: center;
}

.image-preview img,
.current-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.current-image {
    margin-top: 0.5rem;
    text-align: center;
}

.btn-remove {
    margin-top: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-remove:hover {
    background: #dc2626;
}

/* Tickets Section */
.tickets-section h4 {
    margin-bottom: 1.5rem;
}

.tickets-summary {
    margin-bottom: 2rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
}

.summary-card h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.25rem;
}

.summary-card p {
    color: #6b7280;
    font-size: 0.875rem;
}

.prize-breakdown {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.prize-breakdown h6 {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.prize-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.prize-summary:last-child {
    border-bottom: none;
}

.prize-name {
    color: #374151;
}

.prize-tickets {
    color: #2563eb;
    font-weight: 500;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tickets-table th,
.tickets-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.tickets-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.tickets-table tbody tr:hover {
    background: #f9fafb;
}

/* Settings Section */
.settings-section {
    max-width: 600px;
}

.settings-form {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-help {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.danger-zone {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.danger-zone h5 {
    color: #dc2626;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.btn-danger-outline {
    background: transparent;
    color: #dc2626;
    border: 1px solid #dc2626;
}

.btn-danger-outline:hover {
    background: #dc2626;
    color: white;
}

/* Additional Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: white;
    color: #6b7280;
    border-color: #d1d5db;
}

.btn-outline:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .auction-tab-nav {
        flex-wrap: wrap;
    }
    
    .auction-tab-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .prizes-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}
