/* Free Games Radar - Public Styles */

.fgr-games-container {
    margin: 20px 0;
    padding: 0;
}

/* Grid Layout */
.fgr-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* List Layout */
.fgr-games-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Game Card */
.fgr-game-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

/* Game Image */
.fgr-game-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.fgr-game-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fgr-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.fgr-no-image span {
    font-size: 48px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

/* Discount Badge */
.fgr-discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4757;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Platform Badge */
.fgr-platform-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.fgr-platform-epic {
    background: linear-gradient(135deg, #313131 0%, #000000 100%);
}

.fgr-platform-steam {
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
}

.fgr-platform-playstation {
    background: linear-gradient(135deg, #003087 0%, #0070cc 100%);
}

.fgr-platform-xbox {
    background: linear-gradient(135deg, #107c10 0%, #0e7a0d 100%);
}

/* Game Content */
.fgr-game-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.fgr-game-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #2c3e50;
    min-height: 48px;
}

.fgr-game-description {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #5a6c7d;
    flex-grow: 1;
}

/* Game Meta */
.fgr-game-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
    flex-wrap: wrap;
    gap: 8px;
}

.fgr-price {
    font-size: 16px;
    font-weight: 700;
}

.fgr-free {
    color: #27ae60;
    background: #e8f8f5;
    padding: 4px 12px;
    border-radius: 6px;
}

.fgr-price-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fgr-original-price {
    font-size: 14px;
    color: #95a5a6;
    text-decoration: line-through;
}

.fgr-final-price {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.fgr-price-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fgr-end-date {
    font-size: 12px;
    color: #888;
    font-weight: 400;
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-top: 4px;
    display: block;
}

/* Game Actions */
.fgr-game-actions {
    margin-top: auto;
}

.fgr-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.fgr-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.fgr-button-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.fgr-external-icon {
    font-size: 16px;
}

/* Games Footer */
.fgr-games-footer {
    margin-top: 30px;
    text-align: center;
}

.fgr-info-text {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

/* No Games Message */
.fgr-no-games {
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    color: #7f8c8d;
    font-size: 16px;
}

/* List Layout Specific Styles */
.fgr-games-list .fgr-game-card {
    flex-direction: row;
}

.fgr-games-list .fgr-game-image {
    width: 300px;
    min-width: 300px;
    padding-top: 0;
    height: 200px;
}

.fgr-games-list .fgr-game-content {
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .fgr-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .fgr-games-list .fgr-game-card {
        flex-direction: column;
    }

    .fgr-games-list .fgr-game-image {
        width: 100%;
        padding-top: 56.25%;
        height: auto;
    }

    .fgr-game-title {
        font-size: 16px;
        min-height: auto;
    }

    .fgr-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .fgr-games-grid {
        grid-template-columns: 1fr;
    }

    .fgr-game-content {
        padding: 16px;
    }

    .fgr-discount-badge,
    .fgr-platform-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Loading State */
.fgr-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.fgr-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: fgr-spin 1s linear infinite;
}

@keyframes fgr-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .fgr-game-card {
        background: #1e1e1e;
    }

    .fgr-game-title {
        color: #e0e0e0;
    }

    .fgr-game-description {
        color: #b0b0b0;
    }

    .fgr-game-meta {
        border-top-color: #333;
    }

    .fgr-final-price {
        color: #e0e0e0;
    }

    .fgr-no-games {
        background: #2a2a2a;
        color: #b0b0b0;
    }
}

/* ================================
   MODAL STYLES
   ================================ */

.fgr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fgr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    animation: fgr-fade-in 0.3s ease;
}

.fgr-modal-content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fgr-slide-up 0.3s ease;
    z-index: 1;
}

.fgr-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    transition: all 0.3s ease;
    z-index: 10;
}

.fgr-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.fgr-modal-body {
    padding: 0;
}

.fgr-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    gap: 16px;
}

.fgr-modal-loading p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.fgr-modal-game-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fgr-modal-image {
    position: relative;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    width: 100%;
}

.fgr-modal-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 280px;
    object-fit: cover;
}

.fgr-modal-platform-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.fgr-modal-platform-badge.fgr-platform-epic {
    background: rgba(0, 0, 0, 0.8);
}

.fgr-modal-platform-badge.fgr-platform-steam {
    background: rgba(23, 26, 33, 0.9);
}

.fgr-modal-platform-badge.fgr-platform-playstation {
    background: rgba(0, 67, 156, 0.9);
}

.fgr-modal-platform-badge.fgr-platform-xbox {
    background: rgba(16, 124, 16, 0.9);
}

.fgr-modal-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 24px 24px 24px;
}

#fgr-modal-game-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.fgr-modal-description-wrapper {
    position: relative;
}

#fgr-modal-game-description {
    margin: 0;
    color: #b0b0b0;
    font-size: 14px;
    line-height: 1.6;
    max-height: 80px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

#fgr-modal-game-description.expanded {
    max-height: 1000px;
}

#fgr-modal-game-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #1a1a1a);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#fgr-modal-game-description.expanded::after {
    opacity: 0;
}

.fgr-read-more-btn {
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.fgr-read-more-btn:hover {
    color: #5568d3;
    gap: 6px;
}

.fgr-read-more-btn i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.fgr-read-more-btn.expanded i {
    transform: rotate(180deg);
}

.fgr-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.fgr-modal-price-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#fgr-modal-game-price .fgr-price.fgr-free {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
}

#fgr-modal-game-price .fgr-original-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 18px;
}

#fgr-modal-game-price .fgr-final-price {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
}

#fgr-modal-game-discount .fgr-discount-badge {
    font-size: 18px;
    padding: 8px 16px;
}

.fgr-modal-date-section p {
    margin: 0;
    color: #e74c3c;
    font-size: 14px;
}

.fgr-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fgr-modal-actions-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
}

.fgr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.fgr-btn-primary {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.fgr-btn-primary:hover {
    background: linear-gradient(135deg, #3d3d3d 0%, #2a2a2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.fgr-btn-primary svg {
    transition: transform 0.3s ease;
}

.fgr-btn-primary:hover svg {
    transform: translateX(3px);
}

.fgr-modal-share {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fgr-share-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fgr-btn-whatsapp {
    background: #1a7a47;
    color: white;
    border: 1px solid rgba(37, 211, 102, 0.2);
}

.fgr-btn-whatsapp:hover {
    background: #25D366;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.fgr-btn-telegram {
    background: #005580;
    color: white;
    border: 1px solid rgba(0, 136, 204, 0.2);
}

.fgr-btn-telegram:hover {
    background: #0088cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

/* Animations */
@keyframes fgr-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fgr-slide-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .fgr-modal-content {
        max-width: 95%;
    }

    #fgr-modal-game-title {
        font-size: 20px;
    }

    .fgr-modal-info {
        padding: 0 16px 16px 16px;
    }

    .fgr-modal-image img {
        max-height: 200px;
    }

    .fgr-modal {
        padding: 12px;
    }

    .fgr-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .fgr-modal-actions-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .fgr-modal-content {
        max-width: 100%;
    }

    #fgr-modal-game-title {
        font-size: 18px;
    }

    #fgr-modal-game-description {
        font-size: 13px;
        max-height: 70px;
    }

    .fgr-read-more-btn {
        font-size: 11px;
    }

    .fgr-modal-meta {
        padding: 14px;
    }

    .fgr-modal-image img {
        max-height: 180px;
    }

    .fgr-modal-close {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
}
