/* ============================================
   FEATURE FLAGS - ADDITIONAL STYLES
   New styles for search, newsletter, and other features
   ============================================ */

/* Search Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay .modal {
    background: var(--bg-secondary, #12121a);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 16px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-overlay .modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-overlay .modal-title {
    font-family: var(--font-display, 'Orbitron', sans-serif);
    font-size: 1.25rem;
    margin: 0;
}

.modal-overlay .modal-close {
    background: none;
    border: none;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-overlay .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #fff);
}

.modal-overlay .modal-body {
    padding: 1.5rem;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.newsletter-form .form-input {
    width: 100%;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary, #fff);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.newsletter-form .form-input:focus {
    outline: none;
    border-color: var(--accent-primary, #00f0ff);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-form .form-input::placeholder {
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

/* Search Results */
#search-results {
    max-height: 400px;
    overflow-y: auto;
}

#search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-track {
    background: var(--bg-secondary, #12121a);
    border-radius: 4px;
}

#search-results::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.3);
    border-radius: 4px;
}

#search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.5);
}

/* Search Input Styling */
#search-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--bg-tertiary, #1a1a25);
    border: 2px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    color: var(--text-primary, #fff);
    font-family: var(--font-body, 'Rajdhani', sans-serif);
    font-size: 1rem;
    transition: all 0.2s;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent-primary, #00f0ff);
    box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.1);
}

/* Discord Widget Container */
.discord-widget-container {
    margin-top: var(--space-2xl, 3rem);
    display: flex;
    justify-content: center;
    padding: var(--space-xl, 2rem);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-xl, 16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.discord-widget-container iframe {
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* Events List Styling */
#events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-top: var(--space-xl, 2rem);
}

.event-card {
    background: var(--bg-card, rgba(20, 20, 30, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-xl, 2rem);
    transition: all 0.3s ease;
}

.event-card:hover {
    border-color: var(--accent-primary, #00f0ff);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.15);
}

.event-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md, 1rem);
    margin-bottom: var(--space-md, 1rem);
}

.event-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.event-title {
    font-family: var(--font-display, 'Orbitron', sans-serif);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.event-date {
    font-size: 0.85rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    margin-top: 0.25rem;
}

.event-description {
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Button Icon Style */
.btn-icon {
    padding: 0.5rem;
    min-width: auto;
    aspect-ratio: 1;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #fff);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .discord-widget-container iframe {
        width: 100% !important;
        max-width: 350px;
    }
    
    #events-list {
        grid-template-columns: 1fr;
    }
    
    .modal-overlay .modal {
        max-width: 95%;
        margin: 0 auto;
    }
    
    .newsletter-form {
        width: 100%;
    }
}

/* Dark Mode Toggle (if implemented) */
.dark-mode-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary, #00f0ff);
}

/* Leaderboard Styles (for future use) */
.leaderboard-table {
    width: 100%;
    background: var(--bg-card, rgba(20, 20, 30, 0.8));
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-table thead {
    background: rgba(0, 240, 255, 0.1);
}

.leaderboard-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-family: var(--font-display, 'Orbitron', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--accent-primary, #00f0ff);
}

.leaderboard-table td {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Player Profile Badge */
.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary, #00f0ff);
}

/* Live Chat Widget Placeholder */
.livechat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary, #00f0ff), var(--accent-secondary, #00c8ff));
    box-shadow: 0 4px 24px rgba(0, 240, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
}

.livechat-widget:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 32px rgba(0, 240, 255, 0.6);
}

.livechat-widget svg {
    width: 28px;
    height: 28px;
    color: var(--bg-primary, #0a0a0f);
}

/* Ticket System Badge */
.ticket-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ticket-status.open {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success, #10b981);
}

.ticket-status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning, #f59e0b);
}

.ticket-status.closed {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
}