/* Premium Modal & App Details Styles */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    background: rgba(255, 255, 255, 0.8) !important;
    overflow-y: auto;
    position: relative;
    padding: 3rem;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.modal-app-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    border: var(--glass-border);
}

.modal-title-info h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f59e0b;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* Modal Gallery */
.modal-gallery {
    margin: 2rem 0 3rem;
    background: rgba(0, 0, 0, 0.02);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: var(--glass-border-light);
}

.gallery-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
}

.gallery-scroll::-webkit-scrollbar {
    height: 6px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.2);
    border-radius: 10px;
}

.gallery-img {
    height: 400px;
    width: auto;
    border-radius: 12px;
    scroll-snap-align: start;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
}

.gallery-img:hover {
    transform: scale(1.02);
}

/* Info Layout */
.modal-info-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.info-main h3 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.info-main h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--brand-gradient);
    border-radius: 2px;
}

.info-main p {
    color: var(--text-muted);
    line-height: 1.8;
}

.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.features-list li i {
    color: #10b981;
}

/* Sidebar Stats */
.stats-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.mini-stat {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: var(--glass-border-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.mini-stat label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.mini-stat p {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.tech-box h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }

    .modal-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .modal-app-icon {
        width: 80px;
        height: 80px;
        border-radius: 16px;
    }

    .modal-title-info h2 {
        font-size: 1.75rem;
    }

    .modal-gallery {
        padding: 1rem;
        margin: 1.5rem 0 2rem;
    }

    .gallery-img {
        height: 250px;
    }

    .modal-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .stats-mini-grid {
        gap: 1rem;
    }

    .mini-stat {
        padding: 1rem;
    }

    .mini-stat p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .modal-title-info h2 {
        font-size: 1.5rem;
    }

    .gallery-img {
        height: 200px;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
    }
}
