/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    width: 100%;
    max-width: 56rem;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: scaleUp 0.3s;
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 9999px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-layout {
    display: flex;
    flex-direction: column;
}

.modal-image {
    width: 100%;
    height: 16rem;
    background: black;
    position: relative;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 2rem;
    background: #1a1a1a;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.badge-platform, .badge-category, .badge-version {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-platform {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge-category {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.badge-version {
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
}

.modal-price-section {
    text-align: right;
    white-space: nowrap;
    margin-left: 1rem;
}

.modal-price {
    font-size: 1.875rem;
    font-weight: 700;
    color: #3b82f6;
    transition: transform 0.3s;
}

.modal-price:hover {
    transform: scale(1.1);
}

.modal-sales {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.modal-description {
    margin-bottom: 2rem;
    max-height: 15rem;
    overflow-y: auto;
}

.modal-description p {
    color: #d1d5db;
    line-height: 1.6;
    font-size: 0.875rem;
}

.modal-tags-section {
    margin-bottom: 2rem;
}

.modal-tags-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: #d1d5db;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.modal-btn-demo, .modal-btn-purchase {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.modal-btn-demo {
    background: #252525;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-btn-demo:hover {
    background: #303030;
}

.modal-btn-purchase {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.modal-btn-purchase:hover {
    background: #2563eb;
}

@media (min-width: 768px) {
    .modal-layout {
        flex-direction: row;
    }
    
    .modal-image {
        width: 50%;
        height: auto;
    }
    
    .modal-info {
        width: 50%;
    }
}
