/* Ember Tags Page Styles */

.ember-hero-area {
    background: var(--gradient-primary);
    padding: 4rem 0 3rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ember-hero-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="p" patternUnits="userSpaceOnUse" width="20" height="20" patternTransform="rotate(45)"><rect width="10" height="20" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23p)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.ember-hero-area .container {
    position: relative;
    z-index: 1;
    padding-top: 31px;
}

.ember-hero-area h1 {
    font-size: var(--font-size-4xl);
    margin: 0 0 0.75rem 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ember-hero-area p {
    font-size: var(--font-size-xl);
    margin: 0;
    opacity: 0.95;
    font-weight: 300;
}

.ember-tag-section {
    background: var(--bg-primary);
    padding: 20px 0;
}

.ember-grid-layout {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.ember-category-wrapper {
    margin-bottom: 2rem;
}

.ember-category-header {
    padding-bottom: 20px;
}

.ember-category-header h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.ember-tag-heading {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.ember-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ember-filter-button {
    padding: 0.5rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.ember-filter-button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.ember-filter-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    position: relative;
}

.ember-filter-button.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: white;
    border-radius: 2px;
}

.ember-card, .ember-tile, [class*="ember-similar"] a {
    transition: all 0.3s ease !important;
    border-width: 2px !important;
    border-radius: 6px !important;
}

.ember-card:hover, .ember-tile:hover, [class*="ember-similar"] a:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 5px 18px rgba(245,158,11,0.25) !important;
    transform: scale(1.03) !important;
}

.ember-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.ember-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(245,158,11,0.1);
    color: #f59e0b;
    border-radius: 4px;
}

.ember-image-area {
    position: relative;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
}

.ember-featured-label {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 10px;
    background: #f59e0b;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    z-index: 2;
}

.ember-image-holder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.ember-image-holder img.error + & {
    display: flex;
}

.ember-placeholder-content {
    text-align: center;
}

.ember-placeholder-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 8px;
}

.ember-placeholder-text {
    font-size: 12px;
    color: var(--text-muted);
}

.ember-game-image {
    width: 100%;
    height: auto;
    display: block;
}

.ember-game-image.error {
    display: none;
}

.ember-info-block {
    padding: 12px;
    background: white;
    border-radius: 0 0 6px 6px;
}

.ember-game-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ember-rating-bar {
    margin-bottom: 8px;
}

.ember-pagination-wrapper {
    margin-top: 1rem;
}

.ember-back-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.ember-back-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1024px) {
    .ember-grid-layout {
        grid-template-columns: repeat(4, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .ember-hero-area {
        padding: 2.5rem 0 2rem;
    }

    .ember-hero-area h1 {
        font-size: var(--font-size-2xl);
    }

    .ember-hero-area p {
        font-size: var(--font-size-base);
    }

    .ember-tag-section {
        padding: 1.5rem 0;
    }

    .ember-category-header h1 {
        font-size: var(--font-size-xl);
    }

    .ember-tag-heading {
        font-size: var(--font-size-base);
    }

    .ember-button-row {
        gap: 0.5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .ember-button-row::-webkit-scrollbar {
        height: 4px;
    }

    .ember-button-row::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 2px;
    }

    .ember-filter-button {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .ember-grid-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .ember-category-header h1 {
        font-size: var(--font-size-lg);
    }

    .ember-tag-heading {
        font-size: var(--font-size-sm);
    }

    .ember-category-wrapper {
        margin-bottom: 1rem;
    }

    .ember-button-row {
        gap: 0.375rem;
        padding-bottom: 0.375rem;
    }

    .ember-filter-button {
        padding: 0.35rem 0.875rem;
        font-size: 0.85rem;
    }

    .ember-grid-layout {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}