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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1e3a2e 0%, #2c5530 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.2;
    max-width: 500px;
    margin: 0 auto;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.tab {
    flex: 1;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab.active {
    color: #2c5530;
    background: white;
    border-bottom-color: #4a7c59;
}

.tab:hover {
    background: #e9ecef;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.controls {
    background: #f8f9fa;
    padding: 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    position: relative;
}

.monitor-controls {
    background: #f8f9fa;
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.control-group label {
    font-weight: 600;
    color: #2c5530;
    font-size: 0.9em;
}

.control-group input, .control-group select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    min-width: 180px;
}

.control-group input:focus, .control-group select:focus {
    outline: none;
    border-color: #4a7c59;
}

.custom-dropdown {
    position: relative;
    min-width: 220px;
    max-width: 100%;
    display: inline-block;
}

.dropdown-selected {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    min-height: 42px;
    box-sizing: border-box;
    min-width: 220px;
}

.dropdown-selected:focus,
.dropdown-selected:hover {
    border-color: #4a7c59;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    color: #666;
    font-size: 12px;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.custom-dropdown.open .dropdown-selected {
    border-color: #4a7c59;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.dropdown-option {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.dropdown-option {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
}

.dropdown-option:hover {
    background-color: #f8f9fa;
}

.dropdown-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    min-width: 14px;
}

.dropdown-option label {
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    user-select: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #4a7c59;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    min-width: 220px;
}

.dropdown-option input[type="checkbox"]:disabled + label {
    color: #999;
}

.search-btn, .monitor-btn {
    background: #4a7c59;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    align-self: flex-end;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.monitor-btn {
    background: #4a7c59;
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 300px;
}

.search-btn:hover, .monitor-btn:hover {
    background: #2c5530;
    transform: translateY(-2px);
}

.monitor-btn:hover {
    background: #c82333;
}

.search-btn:disabled, .monitor-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.content {
    padding: 30px;
}

.monitor-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    border: 1px solid #2196f3;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.monitor-info h3 {
    color: #1976d2;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.monitor-info p {
    color: #555;
    line-height: 1.6;
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #155724;
    margin-bottom: 20px;
}

.success-message h3 {
    margin-bottom: 10px;
    color: #28a745;
}

.existing-request-message {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 20px;
    color: #856404;
    margin-bottom: 20px;
}

.existing-request-message h3 {
    margin-bottom: 10px;
    color: #ff6b35;
    display: flex;
    align-items: center;
    gap: 10px;
}

.existing-request-details {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}

.existing-request-details h4 {
    color: #856404;
    margin-bottom: 10px;
}

.existing-request-details p {
    margin: 5px 0;
    color: #6c5700;
}

.stats {
    display: flex;
    justify-content: space-around;
    background: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c5530;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(44, 85, 48, 0.3);
    border-top: 4px solid #2c5530;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    color: #721c24;
    margin-bottom: 20px;
}

.error-message h3 {
    margin-bottom: 10px;
    color: #dc3545;
}

.retry-button {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.retry-button:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-2px);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results h3 {
    color: #2c5530;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.tee-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tee-time-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.tee-time-card:hover {
    border-color: #4a7c59;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 124, 89, 0.15);
}

.tee-time-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2c5530, #4a7c59);
    border-radius: 12px 12px 0 0;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.course-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c5530;
}

.course-badge {
    background: #2c5530;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.tee-time-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.detail {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.detail-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.detail-value {
    color: #2c5530;
    font-weight: 600;
    font-size: 0.9rem;
}

.time-value {
    font-size: 1rem !important;
    font-weight: bold !important;
}

.price-highlight {
    grid-column: 1 / -1;
    background: #e9f5e9 !important;
    text-align: center;
    font-size: 1.1rem;
}

.price-highlight .detail-value {
    font-size: 1.3rem;
    font-weight: bold;
}

.book-btn {
    background: #4a7c59;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: all 0.3s ease;
}

.book-btn:hover {
    background: #2c5530;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .monitor-controls {
        grid-template-columns: 1fr;
    }
    
    .control-group input, .control-group select {
        min-width: 100%;
    }
    
    .search-btn, .monitor-btn {
        align-self: stretch;
    }
    
    .tee-times-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
    }

    .tee-time-details {
        grid-template-columns: 1fr;
    }
}
