/**
 * 靓号系统样式文件
 * 
 * 包含靓号显示、商城界面、个人中心等相关样式
 * 
 * @package Pixelshare
 * @subpackage Lianghao
 * @version 1.0.0
 */

/* ================================
   靓号徽章样式
   ================================ */

.user-lianghao {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    animation: lianghao-glow 2s ease-in-out infinite alternate;
}

.lianghao-icon {
    width: 14px;
    height: 14px;
    margin-right: 3px;
    filter: brightness(0) invert(1);
    vertical-align: middle;
}

.lianghao-number {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* 发光动画 */
@keyframes lianghao-glow {
    0% {
        box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 0 8px rgba(255, 107, 107, 0.3);
    }
    100% {
        box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 0 12px rgba(255, 167, 38, 0.5);
    }
}

/* 不同尺寸的靓号徽章 */
.lianghao-mini .lianghao-icon {
    width: 14px;
    height: 14px;
}

.lianghao-mini .lianghao-number {
    font-size: 11px;
}

.lianghao-large .lianghao-icon {
    width: 24px;
    height: 24px;
    margin-right: 6px;
}

.lianghao-large .lianghao-number {
    font-size: 18px;
    font-weight: 700;
}

/* ================================
   个人主页靓号信息
   ================================ */

.author-lianghao-info {
    margin-top: 15px;
    padding: 15px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    border-left: 4px solid #ff6b35;
}

.lianghao-badge-large {
    margin-bottom: 8px;
}

.lianghao-expire {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* ================================
   个人中心靓号页面
   ================================ */

.lianghao-center {
    max-width: 100%;
}

.lianghao-status-card,
.lianghao-orders-card,
.lianghao-shop-card {
    background: var(--color-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 10px;
}

/* 当前靓号状态 */
.current-lianghao {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.lianghao-display {
    flex-shrink: 0;
    padding: 20px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 12px;
    text-align: center;
    color: white;
}

.lianghao-info {
    flex: 1;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.info-item label {
    font-weight: 500;
    color: var(--color-text-secondary);
    width: 100px;
    flex-shrink: 0;
}

.info-item span {
    color: var(--color-text);
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.lianghao-actions {
    flex-shrink: 0;
    align-self: center;
}

.btn-renew {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-renew:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* 空状态 */
.no-lianghao {
    text-align: center;
    padding: 40px 20px;
}

.empty-state {
    max-width: 300px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 48px;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.empty-state h4 {
    margin-bottom: 8px;
    color: var(--color-text);
}

.empty-state p {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

/* 到期提醒 */
.lianghao-notice {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.lianghao-notice.expired {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.lianghao-notice.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.lianghao-notice.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ================================
   购买记录
   ================================ */

.orders-list {
    space-y: 12px;
}

.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.order-info {
    flex: 1;
}

.order-number {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.order-lianghao {
    font-weight: 500;
    color: var(--color-text);
}

.order-details {
    text-align: center;
    margin: 0 20px;
}

.order-amount {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.order-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.order-status.status-pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.status-paid {
    background: #d4edda;
    color: #155724;
}

.order-status.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.order-status.status-refunded {
    background: #e2e3e5;
    color: #383d41;
}

.order-date {
    font-size: 13px;
    color: var(--color-text-secondary);
    text-align: right;
}

/* ================================
   靓号商城
   ================================ */

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.recommended-grid,
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.shop-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--color-bg-secondary);
    border-radius: 6px;
    padding: 2px;
}

.search-box input {
    border: none;
    background: none;
    padding: 8px 12px;
    outline: none;
    color: var(--color-text);
    width: 200px;
}

.search-box button {
    background: var(--color-primary);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-box button:hover {
    background: var(--color-primary-hover);
}

.filter-box select {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--color-text);
    outline: none;
}

/* 商品卡片 */
.lianghao-product-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.lianghao-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--color-primary);
}

.lianghao-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lianghao-product-card:hover::before {
    opacity: 1;
}

.product-header {
    margin-bottom: 16px;
}

.product-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-type.type-regular {
    background: #e3f2fd;
    color: #1976d2;
}

.product-type.type-premium {
    background: #fff3e0;
    color: #f57c00;
}

.product-type.type-special {
    background: #fce4ec;
    color: #c2185b;
}

.product-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-info {
    margin-bottom: 16px;
}

.product-description {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.product-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.price-symbol {
    font-size: 14px;
    color: var(--color-primary);
}

.price-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
}

.btn-purchase {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.btn-purchase:disabled {
    background: var(--color-text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 加载更多按钮 */
.shop-pagination {
    text-align: center;
    margin-top: 30px;
}

.btn-load-more {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* 加载状态 */
.loading-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--color-text-secondary);
}

.loading-icon {
    font-size: 24px;
    margin-bottom: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.no-products,
.error-message {
    text-align: center;
    padding: 40px;
    color: var(--color-text-secondary);
}

/* ================================
   模态框样式
   ================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    background: var(--color-bg);
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 0 24px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* 购买确认 */
.purchase-info {
    text-align: center;
    margin-bottom: 20px;
}

.lianghao-preview {
    margin-bottom: 16px;
}

.preview-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
}

.price-info,
.balance-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.purchase-note {
    padding: 12px;
    background: var(--color-bg-secondary);
    border-radius: 6px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* 续费选项 */
.renew-options {
    space-y: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--color-bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.option-item:hover {
    background: var(--color-primary-light);
}

.option-item input[type="radio"] {
    margin-right: 12px;
}

.option-item label {
    cursor: pointer;
    flex: 1;
    font-weight: 500;
}

/* ================================
   响应式设计
   ================================ */

@media (max-width: 768px) {
    .current-lianghao {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .lianghao-info {
        width: 100%;
    }
    
    .info-item {
        justify-content: space-between;
    }
    
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .order-details {
        margin: 0;
        text-align: left;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .shop-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .shop-controls {
        justify-content: space-between;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .recommended-grid,
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .modal-dialog {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .lianghao-status-card,
    .lianghao-orders-card,
    .lianghao-shop-card {
        padding: 16px;
    }
    
    .recommended-grid,
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .product-number {
        font-size: 20px;
    }
    
    .price-amount {
        font-size: 16px;
    }
}