/* Roblox Game Finder - Frontend Styles */

:root {
    --rgf-primary: #00A2FF;
    --rgf-primary-dark: #0085d4;
    --rgf-secondary: #393b3d;
    --rgf-accent: #02b757;
    --rgf-danger: #ff4757;
    --rgf-bg: #f4f4f5;
    --rgf-card-bg: #ffffff;
    --rgf-text: #393b3d;
    --rgf-text-light: #666666;
    --rgf-border: #e0e0e0;
    --rgf-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --rgf-radius: 12px;
}

.rgf-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.rgf-header {
    text-align: center;
    margin-bottom: 32px;
}

.rgf-header h2 {
    font-size: 28px;
    color: var(--rgf-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.rgf-header h2::before {
    content: '🎮';
    font-size: 32px;
}

.rgf-header p {
    color: var(--rgf-text-light);
    font-size: 16px;
}

/* Tab Navigation */
.rgf-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--rgf-border);
    padding-bottom: 8px;
}

.rgf-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--rgf-text-light);
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
}

.rgf-tab:hover {
    background: var(--rgf-bg);
    color: var(--rgf-text);
}

.rgf-tab.active {
    background: var(--rgf-primary);
    color: white;
}

.rgf-tab-panel {
    display: none;
}

.rgf-tab-panel.active {
    display: block;
}

/* Search Section */
.rgf-search-section {
    background: var(--rgf-card-bg);
    border-radius: var(--rgf-radius);
    padding: 24px;
    box-shadow: var(--rgf-shadow);
    margin-bottom: 24px;
}

.rgf-search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.rgf-search-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--rgf-border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.rgf-search-input:focus {
    outline: none;
    border-color: var(--rgf-primary);
}

.rgf-search-btn {
    padding: 14px 28px;
    background: var(--rgf-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.rgf-search-btn:hover {
    background: var(--rgf-primary-dark);
}

.rgf-search-results {
    max-height: 300px;
    overflow-y: auto;
}

.rgf-search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.rgf-search-result-item:hover {
    background: var(--rgf-bg);
}

.rgf-search-result-item img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.rgf-search-result-item .info {
    flex: 1;
}

.rgf-search-result-item .name {
    font-weight: 500;
    color: var(--rgf-text);
}

.rgf-search-result-item .stats {
    font-size: 13px;
    color: var(--rgf-text-light);
}

/* Selected Games */
.rgf-selected-games {
    margin-top: 16px;
}

.rgf-selected-games h4 {
    font-size: 14px;
    color: var(--rgf-text-light);
    margin-bottom: 8px;
}

.rgf-selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rgf-selected-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--rgf-primary);
    color: white;
    border-radius: 20px;
    font-size: 14px;
}

.rgf-selected-tag .remove {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.rgf-selected-tag .remove:hover {
    color: var(--rgf-danger);
}

/* Filter Section */
.rgf-filter-section {
    background: var(--rgf-card-bg);
    border-radius: var(--rgf-radius);
    padding: 24px;
    box-shadow: var(--rgf-shadow);
    margin-bottom: 24px;
}

.rgf-filter-group {
    margin-bottom: 20px;
}

.rgf-filter-group:last-child {
    margin-bottom: 0;
}

.rgf-filter-group h4 {
    font-size: 16px;
    color: var(--rgf-text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rgf-filter-group h4::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--rgf-primary);
    border-radius: 2px;
}

.rgf-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rgf-tag {
    padding: 10px 16px;
    background: var(--rgf-bg);
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 14px;
    color: var(--rgf-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rgf-tag:hover {
    background: #e8e8e9;
}

.rgf-tag.selected {
    background: var(--rgf-primary);
    color: white;
    border-color: var(--rgf-primary-dark);
}

/* Submit Button */
.rgf-submit-section {
    text-align: center;
    margin: 24px 0;
}

.rgf-submit-btn {
    padding: 16px 48px;
    background: linear-gradient(135deg, var(--rgf-primary), var(--rgf-primary-dark));
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 162, 255, 0.3);
}

.rgf-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 162, 255, 0.4);
}

.rgf-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Section */
.rgf-results-section {
    margin-top: 32px;
}

.rgf-results-header {
    text-align: center;
    margin-bottom: 24px;
}

.rgf-results-header h3 {
    font-size: 22px;
    color: var(--rgf-text);
    margin-bottom: 8px;
}

.rgf-results-header h3::before {
    content: '✨ ';
}

.rgf-results-grid {
    display: grid;
    gap: 20px;
}

.rgf-game-card {
    background: var(--rgf-card-bg);
    border-radius: var(--rgf-radius);
    overflow: hidden;
    box-shadow: var(--rgf-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rgf-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.rgf-game-card-inner {
    display: flex;
    gap: 16px;
    padding: 16px;
}

.rgf-game-thumbnail {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.rgf-game-info {
    flex: 1;
    min-width: 0;
}

.rgf-game-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--rgf-text);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rgf-game-creator {
    font-size: 13px;
    color: var(--rgf-text-light);
    margin-bottom: 8px;
}

.rgf-game-description {
    font-size: 14px;
    color: var(--rgf-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.rgf-game-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--rgf-text-light);
}

.rgf-game-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rgf-game-genre {
    display: inline-block;
    padding: 4px 10px;
    background: var(--rgf-bg);
    border-radius: 12px;
    font-size: 12px;
    color: var(--rgf-text);
    margin-top: 8px;
}

.rgf-game-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--rgf-accent);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 12px;
    transition: background 0.2s ease;
}

.rgf-game-link:hover {
    background: #029648;
    color: white;
}

/* Loading */
.rgf-loading {
    text-align: center;
    padding: 40px;
}

.rgf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--rgf-border);
    border-top-color: var(--rgf-primary);
    border-radius: 50%;
    animation: rgf-spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* No Results */
.rgf-no-results {
    text-align: center;
    padding: 40px;
    color: var(--rgf-text-light);
}

.rgf-no-results::before {
    content: '😢';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .rgf-container {
        padding: 16px;
    }
    
    .rgf-tabs {
        flex-wrap: wrap;
    }
    
    .rgf-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .rgf-search-box {
        flex-direction: column;
    }
    
    .rgf-game-card-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .rgf-game-thumbnail {
        width: 150px;
        height: 150px;
    }
    
    .rgf-game-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Theme: Dark */
.rgf-theme-dark {
    --rgf-bg: #1a1a2e;
    --rgf-card-bg: #16213e;
    --rgf-text: #eaeaea;
    --rgf-text-light: #a0a0a0;
    --rgf-border: #2a2a4a;
}

.rgf-theme-dark .rgf-tag {
    background: #2a2a4a;
}

.rgf-theme-dark .rgf-tag:hover {
    background: #3a3a5a;
}
