/* ==========================================
   PISHFOROSH ALBUM - FRONTEND STYLES
   استایل فرونت پلاگین پیش‌فروش آلبوم
   ========================================= */

.psa-form-wrapper,
.psa-leaderboard-wrapper {
    --psa-primary: #6c63ff;
    --psa-gradient: linear-gradient(135deg, #6c63ff 0%, #5a52d5 100%);
    --psa-text: rgba(255, 255, 255, 0.9);
    --psa-text-muted: rgba(255, 255, 255, 0.6);
    --psa-bg-dark: rgba(10, 10, 20, 0.95);
    --psa-glass: rgba(255, 255, 255, 0.05);
    --psa-border: rgba(255, 255, 255, 0.1);
    --psa-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    --psa-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset for plugin elements */
.psa-form-wrapper *,
.psa-leaderboard-wrapper * {
    box-sizing: border-box;
}

/* ==========================================
   FORM WRAPPER
   ========================================= */

.psa-form-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* ==========================================
   FORM HEADER
   ========================================= */

.psa-form-header {
    text-align: center;
    margin-bottom: 50px;
}

.psa-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: linear-gradient(135deg,
        rgba(108, 99, 255, 0.15) 0%,
        rgba(108, 99, 255, 0.05) 100%
    );
    border: 1px solid rgba(108, 99, 255, 0.3);
    border-radius: 50px;
    color: var(--psa-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.psa-form-badge i {
    font-size: 18px;
}

.psa-form-description {
    color: var(--psa-text-muted);
    font-size: 16px;
    margin: 0;
}

/* ==========================================
   SECTION TITLE
   ========================================= */

.psa-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--psa-text);
    margin: 0 0 30px 0;
}

.psa-section-title i {
    font-size: 26px;
    color: var(--psa-primary);
}

/* ==========================================
   ALBUM TYPES GRID
   ========================================= */

.psa-album-types {
    margin-bottom: 50px;
}

.psa-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Type Card */
.psa-type-card {
    position: relative;
    padding: 25px 20px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    border: 1.5px solid var(--psa-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    transition: var(--psa-transition);
    overflow: hidden;
    text-align: center;
}

.psa-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(108, 99, 255, 0.1) 0%,
        transparent 100%
    );
    opacity: 0;
    transition: var(--psa-transition);
}

.psa-type-card:hover::before {
    opacity: 1;
}

.psa-type-card:hover {
    transform: translateY(-5px);
    border-color: rgba(108, 99, 255, 0.5);
    box-shadow: 
        0 20px 60px rgba(108, 99, 255, 0.2),
        0 0 40px rgba(108, 99, 255, 0.1);
}

.psa-type-card.active {
    border-color: var(--psa-primary);
    background: linear-gradient(135deg,
        rgba(108, 99, 255, 0.15) 0%,
        rgba(108, 99, 255, 0.05) 100%
    );
    box-shadow: 
        0 20px 60px rgba(108, 99, 255, 0.3),
        0 0 60px rgba(108, 99, 255, 0.2);
}

/* VIP Card */
.psa-type-vip {
    border-color: rgba(255, 215, 0, 0.3);
}

.psa-type-vip:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 
        0 20px 60px rgba(255, 215, 0, 0.2),
        0 0 40px rgba(255, 215, 0, 0.1);
}

.psa-type-vip.active {
    border-color: #FFD700;
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.15) 0%,
        rgba(255, 215, 0, 0.05) 100%
    );
}

/* VIP Badge */
.psa-vip-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50px;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.psa-vip-badge i {
    font-size: 14px;
}

/* Type Icon */
.psa-type-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        rgba(108, 99, 255, 0.2) 0%,
        rgba(108, 99, 255, 0.1) 100%
    );
    border-radius: 16px;
    margin: 0 auto 15px auto;
}

.psa-type-icon i {
    font-size: 28px;
    color: var(--psa-primary);
}

.psa-type-vip .psa-type-icon {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.2) 0%,
        rgba(255, 215, 0, 0.1) 100%
    );
}

.psa-type-vip .psa-type-icon i {
    color: #FFD700;
}

/* Type Title & Description */
.psa-type-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--psa-text);
    margin: 0 0 6px 0;
}

.psa-type-desc {
    font-size: 13px;
    color: var(--psa-text-muted);
    margin: 0 0 15px 0;
    line-height: 1.5;
}

/* Type Price */
.psa-type-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    justify-content: center;
    margin-bottom: 15px;
    padding: 12px 0;
    border-top: 1px solid var(--psa-border);
    border-bottom: 1px solid var(--psa-border);
}

.price-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--psa-text);
}

.price-currency {
    font-size: 13px;
    color: var(--psa-text-muted);
}

/* Type Features */
.psa-type-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--psa-text-muted);
    justify-content: center;
}

.feature-item i {
    font-size: 14px;
    color: var(--psa-primary);
    flex-shrink: 0;
}

.psa-type-vip .feature-item i {
    color: #FFD700;
}

/* Custom Amount Section */
.psa-custom-amount-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg,
        rgba(168, 85, 247, 0.1) 0%,
        rgba(108, 99, 255, 0.05) 100%
    );
    border: 1.5px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    text-align: center;
}

.custom-amount-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--psa-text);
    font-size: 16px;
    font-weight: 600;
}

.custom-amount-header i {
    font-size: 22px;
    color: #a855f7;
}

.custom-amount-input-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto 15px auto;
}

.psa-custom-amount-input {
    width: 100%;
    padding: 14px 80px 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid var(--psa-border);
    border-radius: 12px;
    color: var(--psa-text);
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    text-align: center;
    transition: var(--psa-transition);
}

.psa-custom-amount-input:focus {
    outline: none;
    border-color: #a855f7;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.psa-custom-amount-input::placeholder {
    color: var(--psa-text-muted);
    font-weight: normal;
}

.custom-amount-currency {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--psa-text-muted);
    pointer-events: none;
}

.custom-amount-note {
    font-size: 12px;
    color: var(--psa-text-muted);
    margin: 0;
}

/* ==========================================
   ORDER FORM
   ========================================= */

.psa-order-form {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    border: 1.5px solid var(--psa-border);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--psa-shadow);
}

.psa-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.psa-form-group-full {
    grid-column: 1 / -1;
}

/* Form Group */
.psa-form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Label */
.psa-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--psa-text);
}

.psa-label i {
    font-size: 16px;
    color: var(--psa-primary);
}

.required {
    color: #ff6b6b;
    margin-right: 4px;
}

/* Input & Textarea */
.psa-input,
.psa-textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--psa-border);
    border-radius: 12px;
    color: var(--psa-text);
    font-size: 14px;
    font-family: inherit;
    transition: var(--psa-transition);
}

.psa-input:focus,
.psa-textarea:focus {
    outline: none;
    border-color: var(--psa-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.psa-input::placeholder,
.psa-textarea::placeholder {
    color: var(--psa-text-muted);
}

.psa-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Error Message */
.psa-error {
    display: none;
    font-size: 12px;
    color: #ff6b6b;
    margin-top: -5px;
}

.psa-form-group.has-error .psa-input,
.psa-form-group.has-error .psa-textarea {
    border-color: #ff6b6b;
}

.psa-form-group.has-error .psa-error {
    display: block;
}

/* ==========================================
   ORDER SUMMARY
   ========================================= */

.psa-order-summary {
    background: linear-gradient(135deg,
        rgba(108, 99, 255, 0.1) 0%,
        rgba(108, 99, 255, 0.05) 100%
    );
    border: 1.5px solid rgba(108, 99, 255, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.summary-header i {
    font-size: 22px;
    color: var(--psa-primary);
}

.summary-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--psa-text);
    margin: 0;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--psa-border);
}

.summary-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-total {
    padding-top: 15px;
    border-top: 2px solid rgba(108, 99, 255, 0.3);
    border-bottom: none;
}

.summary-label {
    font-size: 14px;
    color: var(--psa-text-muted);
}

.summary-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--psa-text);
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.summary-total .summary-value {
    font-size: 24px;
    color: var(--psa-primary);
}

.currency {
    font-size: 12px;
    color: var(--psa-text-muted);
}

/* ==========================================
   SUBMIT BUTTON
   ========================================= */

.psa-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 32px;
    background: var(--psa-gradient);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--psa-transition);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.psa-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.psa-submit-btn:hover::before {
    left: 100%;
}

.psa-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(108, 99, 255, 0.5);
}

.psa-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.psa-submit-btn.loading {
    pointer-events: none;
}

.psa-submit-btn.loading .btn-text,
.psa-submit-btn.loading .btn-icon {
    opacity: 0;
}

.psa-submit-btn.loading .btn-loader {
    display: block !important;
}

.btn-loader i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-icon i {
    font-size: 20px;
}

/* ==========================================
   MESSAGES
   ========================================= */

.psa-message {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    margin-top: 20px;
}

.psa-message.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4CAF50;
}

.psa-message.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ff6b6b;
}

/* ==========================================
   SECURITY NOTICE
   ========================================= */

.psa-security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    padding: 15px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 12px;
    color: #4CAF50;
    font-size: 13px;
}

.psa-security-notice i {
    font-size: 20px;
}

/* ==========================================
   LEADERBOARD
   ========================================= */

.psa-leaderboard-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.psa-leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px 30px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    border: 1.5px solid var(--psa-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
}

.leaderboard-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leaderboard-title-wrapper i {
    font-size: 28px;
    color: #FFD700;
}

.leaderboard-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--psa-text);
    margin: 0;
}

.leaderboard-refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.3);
    border-radius: 12px;
    color: var(--psa-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--psa-transition);
}

.leaderboard-refresh-btn:hover {
    background: rgba(108, 99, 255, 0.2);
    transform: scale(1.05);
}

.leaderboard-refresh-btn i {
    font-size: 16px;
}

/* Leaderboard Content */
.psa-leaderboard-content {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    border: 1.5px solid var(--psa-border);
    border-radius: 24px;
    padding: 30px;
    backdrop-filter: blur(20px);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Leaderboard Item */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--psa-border);
    border-radius: 16px;
    transition: var(--psa-transition);
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(-5px);
}

/* Rank Styles */
.leaderboard-item.rank-gold {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.1) 0%,
        rgba(255, 215, 0, 0.05) 100%
    );
}

.leaderboard-item.rank-silver {
    border-color: rgba(192, 192, 192, 0.4);
    background: linear-gradient(135deg,
        rgba(192, 192, 192, 0.1) 0%,
        rgba(192, 192, 192, 0.05) 100%
    );
}

.leaderboard-item.rank-bronze {
    border-color: rgba(205, 127, 50, 0.4);
    background: linear-gradient(135deg,
        rgba(205, 127, 50, 0.1) 0%,
        rgba(205, 127, 50, 0.05) 100%
    );
}

/* Item Rank */
.item-rank {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.rank-gold .item-rank {
    color: #FFD700;
}

.rank-silver .item-rank {
    color: #C0C0C0;
}

.rank-bronze .item-rank {
    color: #CD7F32;
}

.item-rank i {
    font-size: 32px;
}

.rank-number {
    color: var(--psa-text-muted);
}

/* Item Avatar */
.item-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--psa-gradient);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

/* Item Info */
.item-info {
    flex: 1;
}

.buyer-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--psa-text);
    margin-bottom: 6px;
}

.buyer-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: var(--psa-text-muted);
}

.buyer-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.buyer-meta i {
    font-size: 14px;
}

/* Item Amount */
.item-amount {
    flex-shrink: 0;
    text-align: left;
}

.amount-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--psa-text);
    margin-bottom: 4px;
}

.amount-currency {
    font-size: 11px;
    color: var(--psa-text-muted);
}

/* Empty State */
.leaderboard-empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
}

.empty-icon i {
    font-size: 40px;
    color: var(--psa-primary);
}

.empty-text {
    font-size: 16px;
    color: var(--psa-text);
    margin: 0 0 8px 0;
}

.empty-subtext {
    font-size: 14px;
    color: var(--psa-text-muted);
    margin: 0;
}

/* Loading Overlay */
.psa-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    z-index: 10;
}

.loading-spinner i {
    font-size: 48px;
    color: var(--psa-primary);
    animation: spin 1s linear infinite;
}

/* ==========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 991px) {
    .psa-types-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .psa-types-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .psa-type-card {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .psa-form-wrapper {
        padding: 40px 10px;
    }
    
    .psa-order-form {
        padding: 25px 15px;
    }
    
    .psa-leaderboard-wrapper {
        padding: 0 10px;
    }
    
    .psa-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .psa-section-title {
        font-size: 20px;
    }
    
    .psa-leaderboard-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .leaderboard-title {
        font-size: 20px;
    }
    
    .leaderboard-item {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .item-amount {
        width: 100%;
        text-align: right;
    }
}

@media (max-width: 480px) {
    .psa-form-wrapper {
        padding: 30px 5px;
    }
    
    .psa-type-card {
        padding: 25px 20px;
    }
    
    .psa-order-form {
        padding: 20px 12px;
    }
    
    .summary-total .summary-value {
        font-size: 20px;
    }
    
    .psa-submit-btn {
        padding: 16px 24px;
        font-size: 15px;
    }
    
    .psa-leaderboard-wrapper {
        padding: 0 5px;
    }
    
    .leaderboard-item {
        padding: 15px 12px;
    }
}

