/* Random Account Detail Page Styling - Modern Dark Glassmorphism */
.detail {
    padding: 50px 0;
    background-color: transparent;
}

.detail__content {
    background: transparent;
    padding: 20px 0;
}

.detail__layout {
    display: grid;
    grid-template-columns: 58% 1fr;
    gap: 30px;
    align-items: stretch;
}

.detail__left {
    display: flex;
    flex-direction: column;
}

.detail__gallery-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.detail__main-img {
    width: 100%;
    border-radius: 8px;
    display: block;
    transition: transform 0.3s ease;
}

.detail__main-img:hover {
    transform: scale(1.02);
}

.detail__right {
    display: flex;
    flex-direction: column;
}

.detail__info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px;
    height: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.detail__header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail__id {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.detail__price {
    font-size: 2.6rem;
    font-weight: 800;
    color: #00d4ff;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .detail__price {
        font-size: 2.2rem;
    }
}

.detail__specs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.detail__spec-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.spec-label {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    white-space: nowrap;
    /* Prevent label from wrapping */
    flex-shrink: 0;
    /* Ensure label doesn't shrink */
    margin-right: 15px;
}

.spec-value {
    font-size: 1.6rem;
    color: #fff;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    /* Handle long text */
}

.detail__actions-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-buy-now {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.6rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-buy-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-add-cart {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sold-badge {
    text-align: center;
    padding: 15px;
    background: rgba(255, 0, 0, 0.1);
    color: #ff4d4d;
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
    align-items: center;
    justify-content: center;
}

.modal__overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 500px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal__header {
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.modal__close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 2.4rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal__close:hover {
    color: #fff;
}

.modal__body {
    padding: 25px;
}

.modal__info-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal__info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal__label {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.6);
}

.modal__value--price {
    font-size: 2rem;
    font-weight: 800;
    color: #00d4ff;
}

.modal__discount-box {
    margin-bottom: 20px;
}

.discount-input-row {
    display: flex;
    gap: 10px;
}

.modal__input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 15px;
    color: #fff;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.modal__input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
}

.modal__btn-check {
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal__btn-check:hover {
    background: #764ba2;
}

.modal__msg {
    font-size: 1.3rem;
    margin-top: 8px;
    min-height: 1.3rem;
}

.modal__warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 15px;
    color: #ffc107;
    font-size: 1.4rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal__footer {
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-confirm-buy {
    flex: 2;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 700;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm-buy:hover {
    background: #218838;
}

.btn-deposit,
.btn-deposit-atm,
.btn-login-to-buy {
    flex: 2;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn-close-modal {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 992px) {
    .detail__layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .detail {
        padding: 20px 0;
    }

    .detail__id {
        font-size: 1.8rem;
    }

    .detail__price {
        font-size: 2.2rem;
    }

    .modal__content {
        width: 95%;
        margin: 10px;
    }

    .modal__footer {
        flex-direction: column;
    }
}

/* ================================
   PURCHASE SUCCESS MODAL
   ================================ */
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1200;
    align-items: center;
    justify-content: center;
}

.success-modal__overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.success-modal__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 650px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    animation: successModalSlideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin: 15px;
}

@keyframes successModalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-modal__close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2.8rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: all 0.2s;
}

.success-modal__close:hover {
    color: white;
    transform: rotate(90deg);
}

/* Header */
.success-modal__header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.success-modal__icon {
    width: 45px;
    height: 45px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.4);
}

.success-modal__icon i {
    color: #fff;
    font-size: 1.8rem;
}

.success-modal__title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.success-modal__badge {
    font-size: 1rem;
    color: #00d4ff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.success-modal__title {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin: 0;
}

/* Account Image */
.success-modal__image {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 350px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.success-modal__image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.success-modal__content:hover .success-modal__image img {
    transform: scale(1.05);
}

/* Account Info */
.success-modal__info {
    padding: 25px;
}

.success-modal__info-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #00d4ff;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-modal__info-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.3), transparent);
}

.success-modal__info-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.success-modal__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.success-modal__row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.success-modal__row:last-child {
    border-bottom: none;
}

.success-modal__label {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.success-modal__value-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.success-modal__value {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
}

.success-modal__copy-btn {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.success-modal__copy-btn:hover {
    background: #00d4ff;
    color: #000;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.success-modal__copy-btn:active {
    transform: scale(0.95);
}

/* Review Link */
.success-modal__review {
    padding: 0 25px 15px;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.success-modal__review i {
    color: #ffc107;
}

.success-modal__review a {
    color: #00d4ff;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed #00d4ff;
}

.success-modal__review a:hover {
    color: white;
    border-bottom-style: solid;
}

/* Action Buttons */
.success-modal__actions {
    display: flex;
    gap: 15px;
    padding: 15px 25px 25px;
}

.success-modal__btn {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.success-modal__btn--primary {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: white;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.success-modal__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
}

.success-modal__btn--secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.success-modal__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ================================
   RESPONSIVE - MOBILE FOR SUCCESS MODAL
   ================================ */
@media (max-width: 650px) {
    .success-modal__content {
        max-width: 95%;
        margin: 10px;
        border-radius: 16px;
    }

    .success-modal__image {
        max-height: 250px;
    }

    .success-modal__title {
        font-size: 1.5rem;
    }

    .success-modal__info {
        padding: 20px;
    }

    .success-modal__row {
        padding: 14px 15px;
    }

    .success-modal__value {
        font-size: 1.3rem;
    }

    .success-modal__actions {
        flex-direction: column;
        gap: 10px;
    }
}