/* Fun Features Modal Styles */

/* Modal Overlay */
.fun-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fun-modal-overlay.modal-open {
    opacity: 1;
    visibility: visible;
}

.fun-modal-overlay.modal-closing {
    opacity: 0;
    visibility: hidden;
}

/* Modal Content */
.fun-modal-content {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    border-radius: 20px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalBounceIn 0.5s ease-out;
    border: 3px solid var(--color-fun-accent, #FFE66D);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(255, 230, 109, 0.2),
        inset 0 0 30px rgba(255, 107, 53, 0.1);
}

@keyframes modalBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.7) rotate(-5deg);
    }
    50% {
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

/* Close Button */
.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--color-fun-accent, #FFE66D);
    color: #2C3E50;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: #FF6B35;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* Modal Header */
.modal-header {
    padding: 40px 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, transparent 100%);
    border-bottom: 2px solid rgba(255, 230, 109, 0.3);
}

.modal-title {
    font-size: 36px;
    font-weight: bold;
    color: #FFE66D;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    font-size: 32px;
    animation: iconSpin 3s linear infinite;
}

@keyframes iconSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.modal-subtitle {
    color: #4ECDC4;
    font-size: 18px;
    font-style: italic;
    margin: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px;
}

/* Feature Cards */
.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-fun-secondary, #4ECDC4);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.card-icon {
    font-size: 32px;
}

.card-header h3 {
    color: white;
    font-size: 20px;
    margin: 0;
}

.card-description {
    color: #B0BEC5;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.card-description em {
    display: block;
    margin-top: 5px;
    color: #FFB6C1;
    font-size: 12px;
}

.card-hint {
    background: rgba(255, 230, 109, 0.1);
    border-left: 3px solid #FFE66D;
    padding: 8px 12px;
    margin-top: 15px;
    color: #FFE66D;
    font-size: 12px;
    border-radius: 5px;
}

/* Feature Lists */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.feature-list::-webkit-scrollbar {
    width: 6px;
}

.feature-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.feature-list::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.5);
    border-radius: 3px;
}

.feature-item,
.theme-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.feature-item:hover,
.theme-item:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #FF6B35;
    transform: translateX(5px);
    padding-left: 20px;
}

.item-tag {
    background: linear-gradient(135deg, #FF6B35, #FFE66D);
    color: #2C3E50;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    animation: tagPulse 2s ease infinite;
}

@keyframes tagPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Special card styles */
.magazines-card {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.05) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.games-card {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.vr-card {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.05) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.themes-card {
    background: linear-gradient(135deg, rgba(255, 230, 109, 0.05) 0%, rgba(255, 255, 255, 0.05) 100%);
}

/* Modal Footer */
.modal-footer {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid rgba(255, 230, 109, 0.3);
    text-align: center;
}

.modal-footer p {
    margin: 0;
    color: #B0BEC5;
    font-size: 14px;
    font-style: italic;
}

/* Theme change animation */
@keyframes themeChange {
    0% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(180deg) brightness(1.2); }
    100% { filter: hue-rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .modal-title {
        font-size: 28px;
    }

    .feature-list {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .fun-modal-content {
        border-radius: 10px;
        border-width: 2px;
    }

    .modal-header {
        padding: 30px 20px 15px;
    }

    .modal-title {
        font-size: 24px;
    }

    .title-icon {
        font-size: 24px;
    }

    .feature-card {
        padding: 15px;
    }
}