/* Base Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.discounted-price {
    -webkit-text-fill-color: limegreen;
}
.current-price {
    -webkit-text-fill-color: darkturquoise;
}
.original-price {
    -webkit-text-fill-color: #00418f;
}
.modal.show {
    display: flex;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background: linear-gradient(to bottom, #1b2838 0%, #171a21 100%);
    border-radius: 1rem;
    box-shadow: 0 8px 40px rgba(51,142,220,0.18);
    padding: 1.5rem;
    color: var(--text-main);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    color: var(--accent);
    font-family: var(--font-heading);
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--secondary-color);
}

.modal-body {
    padding: 1rem 0;
}

/* TOS Modal specific styles */
#tosModal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 1.5rem;
    scrollbar-width: thin;
}

#tosModal .modal-body h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent-color, #66c0f4);
}

#tosModal .modal-body h4:first-child {
    margin-top: 0;
}

#tosModal .modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Scrollbar styling for webkit browsers */
#tosModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#tosModal .modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

#tosModal .modal-body::-webkit-scrollbar-thumb {
    background-color: var(--accent-color, #66c0f4);
    border-radius: 4px;
}

/* Remove old grid layout for product-details-grid */
.product-details-grid {
    display: block;
    padding: 0;
    gap: 0;
}

/* New vertical layout for modal */
.product-details-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 24px;
}

.product-details-image-top {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.product-details-image-top img {
    max-width: 100%;
    max-height: 320px;
    border-radius: 1rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    object-fit: cover;
}

.product-details-info {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: rgba(35,39,47,0.98);
    border-radius: 1rem;
    padding: 24px 28px;
    box-shadow: 0 2px 24px rgba(102,192,244,0.08);
}

.product-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.product-modal-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #66c0f4;
    margin-bottom: 0.5rem;
}

.product-modal-description {
    color: var(--text-color);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.product-modal-meta {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.product-modal-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 18px;
}

.product-modal-actions .btn {
    font-size: 1.1rem;
    padding: 10px 28px;
    border-radius: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102,192,244,0.10);
}

.product-details-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.product-details-genre,
.product-details-release,
.product-details-rating {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.value {
    color: var(--text-color);
    font-size: 1rem;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    color: var(--text-muted);
}

.rating-stars i.filled {
    color: var(--warning);
}

.product-details-description {
    color: var(--text-color);
    line-height: 1.6;
    margin: 20px 0;
}

.product-details-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.action-button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.action-button.add-to-cart {
    background-color: var(--primary-color);
    color: white;
}

.action-button.add-to-cart:hover {
    background-color: var(--primary-dark);
}

.action-button.add-to-wishlist {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.action-button.add-to-wishlist:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Message */
.error-message {
    color: var(--danger);
    text-align: center;
    padding: 20px;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 15px 20px;
    border-radius: var(--border-radius-sm);
    background: linear-gradient(to bottom, #1b2838 0%, #171a21 100%);
    color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    animation: slideIn 0.3s ease-out;
    max-width: 350px;
    transition: opacity 0.3s, transform 0.3s;
}

.notification.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification i {
    font-size: 1.2rem;
}

.notification.success {
    background: linear-gradient(to bottom, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.notification.success i {
    color: white;
}

.notification.error {
    background: linear-gradient(to bottom, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.notification.error i {
    color: white;
}

.notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
}

.notification-close:hover {
    color: white;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-content {
        padding: 1rem;
    }
}

/* Fix for nested modals */
.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Ensure proper stacking for multiple modals */
.modal-backdrop + .modal-backdrop {
    z-index: 1045;
}

.modal + .modal {
    z-index: 1055;
}

/* Fix for modal animations */
.modal.fade .modal-dialog {
    transform: translate(0, -50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: none;
}

/* Cart and Wishlist Modal Styles */
.cart-modal, .wishlist-modal {
    max-width: 500px;
    margin: 0 auto;
    background: linear-gradient(to bottom, #1b2838 0%, #171a21 100%);
    color: var(--text-main);
    border-radius: 1rem;
    box-shadow: 0 8px 40px rgba(51,142,220,0.18);
    padding: 1.5rem;
}

.cart-modal .modal-header, .wishlist-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.cart-modal .modal-body, .wishlist-modal .modal-body {
    padding: 1rem 0;
}

.cart-modal .modal-footer, .wishlist-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.cart-modal .btn, .wishlist-modal .btn {
    margin-left: 0.5rem;
}

/* Game Details Modal: wider and custom layout */
.game-details-modal {
    max-width: 900px;
    width: 95vw;
    margin: 2rem auto;
}

.game-details-modal .modal-content {
    padding: 2rem 2.5rem;
}

@media (max-width: 700px) {
    .product-details-info {
        padding: 16px 8px;
        max-width: 100%;
    }
    .product-details-image-top img {
        max-height: 180px;
    }
} 