/* Shared Styles for Sports Booking System */

* {
    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, #ffffff 0%, #b6b6b6 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    padding: 40px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Form Elements */
.form-group {
    margin-bottom: 12px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select:disabled, input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #999;
}

/* Buttons */
.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #2b3b96 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #f8f9fa;
}

.btn-book {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #2b3b96 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-book:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-book:active:not(:disabled) {
    transform: translateY(0);
}

.btn-book:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Loading States */
.loading {
    display: none;
    text-align: center;
    color: #667eea;
    margin-top: 10px;
    font-size: 14px;
}

.loading.active {
    display: block;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

.spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Messages */
.message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Status Page Specific Styles */
.icon-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease-out;
}

.icon-container.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.icon-container.failed {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.icon-container.loading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.icon {
    font-size: 50px;
    font-weight: bolder;
    color: white;
}

.status-message {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.booking-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.booking-details h2 {
    color: #333;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
    font-weight: 500;
}

.detail-value {
    color: #333;
    font-weight: 600;
    text-align: right;
}

.reference-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
}

.error-details {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
    font-size: 14px;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal box */
.otp-modal {
    background: #fff;
    padding: 24px;
    width: 320px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.otp-modal h3 {
    margin-bottom: 12px;
}

.otp-modal input {
    width: 100%;
    padding: 10px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 6px;
    margin-bottom: 16px;
}

.otp-actions {
    display: flex;
    gap: 10px;
}

.otp-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.btn-submit {
    background: #007bff;
    color: #fff;
}

.btn-cancel {
    background: #ccc;
}

/* Utility Classes */
.hidden {
    display: none;
}

.qrcode {
    /* text-align: center; */
    display: flex;
    justify-content: center;
    align-items: center;
    width:100%;
}

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

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 40px 25px;
    }

    h1 {
        font-size: 26px;
    }

    .buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}