/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 80px;
    width: 80px;
    object-fit: contain;
}

.logo i {
    font-size: 2rem;
    color: #b73084;
}

.logo h1 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav .admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #b73084, #621245);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.nav .admin-link:hover {
    background: linear-gradient(135deg, #a02875, #511a3a);
    transform: scale(1.1);
}

/* Main Content */
.main {
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Court Selection */
.court-selection {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #b73084;
}

.tab-button.active {
    color: #b73084;
    border-bottom-color: #b73084;
}

.tab-button i {
    font-size: 1.2rem;
}

/* Court Content */
.court-info {
    display: none;
}

.court-info.active {
    display: block;
}

.court-card {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    border: 1px solid #eee;
    border-radius: 15px;
    background: #f9f9f9;
}

.court-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #b73084, #621245);
    border-radius: 15px;
    color: white;
    font-size: 3rem;
}

.court-details h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.court-details p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #b73084;
    margin-bottom: 1.5rem;
}

.btn-reserve {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #b73084, #621245);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reserve:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(183, 48, 132, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-content.large {
    max-width: 1000px;
}

.modal-content.success {
    max-width: 500px;
    text-align: center;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #b73084, #621245);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

/* Calendar Styles */
.calendar-section {
    margin-bottom: 2rem;
}

.calendar-section h4,
.time-section h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 1rem;
}

.calendar-day {
    padding: 1rem;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.calendar-day:hover {
    background: #f0f4ff;
    border-color: #b73084;
}

.calendar-day.selected {
    background: #b73084;
    color: white;
    border-color: #b73084;
}

.calendar-day.disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

.calendar-day.disabled:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

/* Time Slots */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.time-slot {
    padding: 1rem;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-weight: 600;
}

.time-slot:hover {
    border-color: #b73084;
    background: #f0f4ff;
}

.time-slot.selected {
    background: #b73084;
    color: white;
    border-color: #b73084;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

/* Payment Options */
.payment-options {
    display: flex;
    gap: 1rem;
}

.radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #b73084;
    background: #f0f4ff;
}

.radio-option input[type="radio"] {
    margin: 0;
    width: auto;
}

.radio-option input[type="radio"]:checked + i {
    color: #b73084;
}

.radio-option i {
    font-size: 1.2rem;
}

/* Buttons */
.btn-confirm,
.btn-success,
.btn-save,
.btn-add,
.btn-block,
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #b73084, #621245);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm:hover,
.btn-success:hover,
.btn-save:hover,
.btn-add:hover,
.btn-block:hover,
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(183, 48, 132, 0.4);
}

/* Success Modal */
.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.success h3 {
    color: #28a745;
    margin-bottom: 1rem;
}

/* Booking Info */
.booking-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.booking-info h4 {
    margin-bottom: 1rem;
    color: #333;
}

/* Payment Content */
.pix-payment {
    text-align: center;
}

.pix-key {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 1.1rem;
    border: 2px dashed #b73084;
}

.qr-code {
    width: 200px;
    height: 200px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin: 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #666;
}

.qr-code-container {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-placeholder {
    border: 2px solid #b73084;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

#qrCanvas {
    border-radius: 5px;
}

.payment-confirmation {
    margin-top: 2rem;
}

.btn-confirm-payment {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.btn-confirm-payment:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.payment-providers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.payment-provider-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.payment-provider-btn:hover {
    border-color: #b73084;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(183, 48, 132, 0.2);
}

.payment-provider-btn i {
    font-size: 1.5rem;
    color: #b73084;
}

.payment-provider-btn small {
    color: #666;
    font-weight: normal;
    font-size: 0.9rem;
    display: block;
    margin-top: 0.25rem;
}

.payment-amount {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #b73084, #621245);
    color: white;
    border-radius: 10px;
    margin: 1rem 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.payment-instructions {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.payment-instructions p {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.payment-instructions ul {
    margin: 0;
    padding-left: 1.5rem;
}

.payment-instructions li {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Upload Section */
.upload-section {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.upload-section h5 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-section h5 i {
    color: #b73084;
}

.upload-area {
    margin-bottom: 1.5rem;
}

.upload-drop-zone {
    border: 2px dashed #b73084;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.upload-drop-zone:hover {
    background: #f0f4ff;
    border-color: #a02875;
}

.upload-drop-zone i {
    font-size: 2rem;
    color: #b73084;
    margin-bottom: 1rem;
}

.upload-drop-zone p {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-drop-zone small {
    color: #666;
    font-size: 0.9rem;
}

.file-preview {
    margin-top: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #e9ecef;
    border-radius: 8px;
    color: #b73084;
    font-size: 1.2rem;
}

.file-details {
    flex: 1;
}

.file-details strong {
    color: #333;
}

.file-details small {
    color: #666;
}

.btn-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-remove-file:hover {
    background: #c82333;
}

.btn-send-receipt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.btn-send-receipt:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-send-receipt:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* Confirmation Dialog */
.confirmation-dialog {
    text-align: center;
    padding: 1rem;
}

.confirmation-dialog h4 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.confirmation-dialog h4 i {
    color: #25d366;
}

.whatsapp-number {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1rem 0;
}

.reservation-preview {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.reservation-preview h5 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.details-grid {
    display: grid;
    gap: 0.5rem;
}

.details-grid div {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.details-grid div:last-child {
    border-bottom: none;
}

.file-attached {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0066cc;
}

.file-attached i {
    color: #0066cc;
}

.confirmation-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-cancel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-cancel:hover {
    background: #545b62;
}

.btn-confirm-send {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1rem;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-confirm-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* Success Instructions */
.next-steps {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.next-steps h4 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.next-steps h4 i {
    color: #b73084;
}

.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: #333;
}

.next-steps li:last-child {
    border-bottom: none;
}

.contact-info {
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: #333;
}

.whatsapp-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #25d366;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.whatsapp-contact:hover {
    color: #128c7e;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .upload-drop-zone {
        padding: 1.5rem 1rem;
    }
    
    .file-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .confirmation-buttons {
        flex-direction: column;
    }
    
    .details-grid {
        font-size: 0.9rem;
    }
    
    .whatsapp-number {
        font-size: 1rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .court-card {
        flex-direction: column;
        text-align: center;
    }
    
    .court-image {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-button {
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .payment-options {
        flex-direction: column;
    }
    
    #calendar {
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
    }
    
    .calendar-day {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .time-slots {
        grid-template-columns: 1fr;
    }
    
    .logo-img {
        height: 80px;
        width: 80px;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
}

/* Error Messages */
.error-message {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 0.75rem;
    margin-top: 1rem;
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    animation: fadeIn 0.3s ease;
}

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

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #b73084;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}