:root {
    --primary: #2d5a27;
    --primary-light: #4a8c42;
    --accent: #f0c24d;
    --white: #ffffff;
    --black: #1a1a1a;
    --grey-100: #f5f5f5;
    --grey-200: #eeeeee;
    --grey-800: #333333;
    --glass: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--black);
    line-height: 1.6;
    background-color: var(--grey-100);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Image Overlay */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), url('bg.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* Header & Nav */
header {
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white);
}

.logo i {
    color: var(--accent);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 5% 4rem;
    color: var(--white);
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Search Box */
.search-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    padding: 0.5rem;
    border-radius: 100px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--white);
    transform: translateY(-5px);
}

.search-box i {
    padding-left: 1.5rem;
    color: var(--white);
    font-size: 1.2rem;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 1rem;
    color: var(--white);
    font-size: 1.1rem;
    font-family: inherit;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box button {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-box button:hover {
    background: var(--white);
    transform: scale(1.05);
}

/* Results Section */
.results-container {
    background: var(--white);
    margin-top: 2rem;
    flex: 1;
    border-radius: 40px 40px 0 0;
    padding: 4rem 5%;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.1);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Course Card */
.course-card {
    background: var(--grey-100);
    border-radius: 24px;
    padding: 2rem;
    transition: var(--transition);
    border: 1px solid var(--grey-200);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.course-card:hover::before {
    opacity: 1;
}

.course-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.course-info .club-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--grey-800);
    font-weight: 500;
    margin-bottom: 1rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--grey-200);
    padding-top: 1rem;
}

.course-id {
    font-size: 0.85rem;
    color: #888;
}

.view-btn {
    color: var(--primary-light);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Status Messages */
.status-message {
    text-align: center;
    padding: 4rem 0;
}

.status-message i {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.status-message h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.status-message p {
    color: #666;
}

.hidden {
    display: none !important;
}

/* Loader */
.loader {
    text-align: center;
    padding: 4rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--grey-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

/* Footer */
footer {
    background: var(--white);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--grey-200);
}

footer p {
    color: #888;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 32px;
    position: relative;
    z-index: 1001;
    overflow-y: auto;
    padding: 3rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--grey-100);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--grey-800);
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--primary);
    color: var(--white);
    transform: rotate(90deg);
}

/* Modal Content Details */
.modal-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--grey-200);
    padding-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

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

.detail-section h3 {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 1rem;
}

.tee-card {
    background: var(--grey-100);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--grey-200);
}

.tee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tee-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.tee-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
    display: block;
}

.stat-value {
    font-weight: 600;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 20px;
        padding: 1rem;
    }
    
    .search-box i {
        display: none;
    }
    
    .search-box input {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .search-box button {
        width: 100%;
    }
    
    .hero {
        padding-top: 4rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.8rem;
    }
    
    .tee-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
