/* Professional Club Hub Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #fafbfc;
    color: #1a202c;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    line-height: 1.5;
}

body.dark-mode {
    background: #0f172a;
    color: #f1f5f9;
}

h1 {
    text-align: center;
    color: #1e293b;
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

body.dark-mode h1 {
    color: #f8fafc;
}

/* Header Container */
.header-container {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 2rem;
    margin-bottom: 0;
    text-align: center;
    position: relative;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-container h1 {
    flex: 1;
    text-align: center;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.student-register-btn {
    background: #10b981;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.student-register-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

body.dark-mode .header-container {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#dark-mode-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #6366f1;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

#dark-mode-toggle:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body.dark-mode #dark-mode-toggle {
    background: #3b82f6;
    color: #ffffff;
}

body.dark-mode #dark-mode-toggle:hover {
    background: #2563eb;
}

#admin-dashboard-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #10b981;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

#admin-dashboard-button:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body.dark-mode #admin-dashboard-button {
    background: #10b981;
}

body.dark-mode #admin-dashboard-button:hover {
    background: #059669;
}

/* Search and Filter Container */
.search-filter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

body.dark-mode .search-filter-container {
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

#search-club {
    flex: 1;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    color: #374151;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

#search-club:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#search-club::placeholder {
    color: #9ca3af;
}

body.dark-mode #search-club {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-mode #search-club::placeholder {
    color: #9ca3af;
}

.filter-btn {
    background: #f8fafc;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.filter-btn:hover {
    background: #f1f5f9;
    border-color: #9ca3af;
}

body.dark-mode .filter-btn {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-mode .filter-btn:hover {
    background: #4b5563;
    border-color: #6b7280;
}

/* Filter Popup */
.filter-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.filter-popup > div {
    background: #ffffff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlide 0.2s ease;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body.dark-mode .filter-popup > div {
    background: #1e293b;
    color: #f8fafc;
}

@keyframes modalSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.filter-popup h2 {
    margin-bottom: 1.5rem;
    color: #1e293b;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
}

body.dark-mode .filter-popup h2 {
    color: #f8fafc;
}

.filter-popup label {
    display: block;
    margin: 1rem 0 0.5rem;
    font-weight: 500;
    color: #374151;
}

body.dark-mode .filter-popup label {
    color: #d1d5db;
}

.filter-popup select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    color: #374151;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-popup select:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

body.dark-mode .filter-popup select {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

body.dark-mode .filter-popup select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-popup button {
    background: #6366f1;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin: 1rem 0.5rem 0 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.filter-popup button:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Clubs List */
#club-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.club-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.4s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.club-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
}

body.dark-mode .club-item {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}

body.dark-mode .club-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    border-color: #475569;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.club-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #6366f1;
    border-radius: 12px 12px 0 0;
}

.pinned-sign {
    position: absolute;
    top: -8px;
    right: 12px;
    background: #f59e0b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0 0 8px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

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

.club-item h3 {
    color: #111827;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    min-width: 0;
}

body.dark-mode .club-item h3 {
    color: #f9fafb;
}

.status-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.status-indicator.green {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-indicator.red {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-indicator.yellow {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fef3c7;
}

.status-indicator.gray {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

body.dark-mode .status-indicator.green {
    background: rgba(22, 101, 52, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

body.dark-mode .status-indicator.red {
    background: rgba(153, 27, 27, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

body.dark-mode .status-indicator.yellow {
    background: rgba(161, 98, 7, 0.2);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

body.dark-mode .status-indicator.gray {
    background: rgba(71, 85, 105, 0.2);
    color: #cbd5e1;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.club-item p {
    margin: 0.75rem 0;
    color: #6b7280;
    line-height: 1.5;
    font-size: 0.875rem;
}

body.dark-mode .club-item p {
    color: #d1d5db;
}

.club-item p strong {
    color: #374151;
    font-weight: 600;
}

body.dark-mode .club-item p strong {
    color: #f9fafb;
}

.click-hint {
    text-align: center;
    color: #6366f1;
    font-weight: 500;
    font-size: 0.875rem;
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.club-item:hover .click-hint {
    opacity: 1;
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

body.dark-mode .click-hint {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

body.dark-mode .club-item:hover .click-hint {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #dark-mode-toggle,
    #admin-dashboard-button {
        position: static;
        margin: 0.5rem;
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .search-filter-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    #search-club {
        max-width: 100%;
    }
    
    #club-list {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem 2rem;
    }
    
    .club-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .status-indicator {
        align-self: flex-start;
    }
    
    .filter-popup > div {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .club-item {
        padding: 1rem;
    }
    
    .club-item h3 {
        font-size: 1.125rem;
    }
    
    .pinned-sign {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1rem;
    color: #6b7280;
}

body.dark-mode .loading {
    color: #d1d5db;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
.club-item:focus,
button:focus,
input:focus,
select:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

body.dark-mode .club-item:focus,
body.dark-mode button:focus,
body.dark-mode input:focus,
body.dark-mode select:focus {
    outline-color: #3b82f6;
}
