/* 京东神券代领平台 - 样式文件 */
/* 红色主题风格，参考原活动页面设计 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    max-width: 100%;
}

html {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    position: relative;
    left: 0;
    right: 0;
}

body {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #fff5f0;
    color: #333;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-overflow-scrolling: touch;
    display: block;
    position: relative;
    left: 0;
    right: 0;
}

.container {
    width: 100%;
    min-width: 0;
    max-width: 750px;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(180deg, #ff2d2d 0%, #ff6b35 30%, #fff5f0 60%);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    left: 0;
    right: 0;
}

/* 顶部横幅 */
.banner {
    position: relative;
    padding: 60px 20px 80px;
    background: linear-gradient(135deg, #ff2d2d 0%, #ff5722 50%, #ff8a00 100%);
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.banner-subtitle {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.15);
    letter-spacing: 2px;
}

.banner-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.3);
}

.banner-decoration {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.gift-box {
    position: relative;
    width: 120px;
    height: 120px;
}

/* 标签页样式 */
.tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab:hover {
    color: #E1251B;
}

.tab.active {
    background: #fff;
    color: #E1251B;
    box-shadow: 0 2px 8px rgba(225, 37, 27, 0.15);
}

.tab svg {
    flex-shrink: 0;
}

/* 标签页面板 */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 查询按钮 */
.query-btn {
    margin-top: 8px;
}

/* 查询结果 */
.query-result {
    margin-top: 24px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #eee;
}

.query-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.query-result-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.query-result-icon.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.query-result-icon.used {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.query-result-icon.invalid {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.query-result-icon.locked {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.query-result-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.query-result-subtitle {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

.query-result-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.query-info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.query-info-label {
    font-size: 14px;
    color: #999;
    flex-shrink: 0;
}

.query-info-value {
    font-size: 14px;
    color: #333;
    text-align: right;
    word-break: break-all;
}

.query-info-value.success {
    color: #4CAF50;
}

.query-info-value.used {
    color: #FF9800;
}

.query-info-value.invalid {
    color: #F44336;
}

.query-info-value.locked {
    color: #FF9800;
}

.query-unused-tip {
    text-align: center;
    padding: 20px 0;
    color: #666;
    font-size: 14px;
}

.query-locked-tip {
    text-align: center;
    padding: 20px 0;
    color: #FF9800;
    font-size: 14px;
}

/* 卡密无效提示 */
.card-invalid-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    margin-top: 12px;
    background: #FFF5F5;
    border: 1px solid #FFE0E0;
    border-radius: 8px;
}

.card-invalid-tip .invalid-icon {
    flex-shrink: 0;
    color: #F44336;
    margin-top: 2px;
}

.card-invalid-tip .invalid-content {
    flex: 1;
}

.card-invalid-tip .invalid-title {
    font-size: 15px;
    font-weight: 600;
    color: #F44336;
    margin-bottom: 4px;
}

.card-invalid-tip .invalid-message {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.coupon-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.coupon {
    position: absolute;
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.coupon-1 {
    top: 0;
    left: 0;
    transform: rotate(-15deg);
    z-index: 1;
}

.coupon-2 {
    top: 10px;
    left: 20px;
    transform: rotate(5deg);
    z-index: 2;
}

.coupon-3 {
    top: 20px;
    left: 10px;
    transform: rotate(-5deg);
    z-index: 3;
    background: linear-gradient(135deg, #ff6b35 0%, #ff2d2d 100%);
}

/* 主内容区 */
.main-content {
    padding: 0 16px;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.card {
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(255, 45, 45, 0.1);
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.title-text {
    position: relative;
    z-index: 2;
}

.title-underline {
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #ffd700 0%, #ffaa00 100%);
    opacity: 0.4;
    border-radius: 4px;
    z-index: 1;
}

/* 输入区 */
.input-section {
    width: 100%;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: #f7f7f7;
    border-radius: 50px;
    padding: 4px 4px 4px 24px;
    margin-bottom: 16px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: #ff2d2d;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 45, 45, 0.1);
}

.area-code {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-right: 12px;
}

.divider {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin-right: 12px;
}

.phone-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 20px;
    color: #333;
    outline: none;
    padding: 16px 12px;
}

.phone-input::placeholder {
    color: #bbb;
}

/* 卡密输入 */
.card-input-wrapper {
    margin-bottom: 16px;
}

.input-icon {
    color: #ff6b35;
    display: flex;
    align-items: center;
    margin-right: 4px;
}

.card-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 20px;
    color: #333;
    outline: none;
    padding: 16px 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.card-input::placeholder {
    color: #bbb;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
}

/* 提示 */
.tips {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff8a00;
    font-size: 14px;
    margin-bottom: 24px;
}

.tip-icon {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    flex-shrink: 0;
}

/* 领取按钮 */
.claim-btn {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 28px;
    background: linear-gradient(135deg, #ff2d2d 0%, #ff6b35 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 45, 45, 0.3);
    position: relative;
    overflow: hidden;
}

.claim-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.claim-btn:hover::before {
    left: 100%;
}

.claim-btn:active {
    transform: scale(0.98);
    box-shadow: 0 3px 10px rgba(255, 45, 45, 0.3);
}

.claim-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* 协议 */
.agreement {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 16px;
}

.agreement .link {
    color: #ff6b35;
    cursor: pointer;
    text-decoration: none;
}

/* 活动规则 */
.rules-card {
    background: #fffaf5;
}

.rules-content {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

.rules-content p {
    margin-bottom: 8px;
}

.rules-content .indent {
    padding-left: 1em;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 24px 20px 40px;
    color: #999;
    font-size: 12px;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    margin: 0 32px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载弹窗 */
.loading-modal .modal-content {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 13px;
    opacity: 0.7;
}

/* 结果弹窗 */
.result-modal-content {
    padding-top: 40px;
}

.result-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-icon svg {
    width: 40px;
    height: 40px;
}

.result-icon.success {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    color: #fff;
}

.result-icon.error {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: #fff;
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.result-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(135deg, #ff2d2d 0%, #ff6b35 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:active {
    transform: scale(0.98);
}

/* 移动端适配 - 确保页面占满宽度并居中 */
@media (max-width: 750px) {
    html, body {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
        position: relative;
        left: 0;
        right: 0;
    }
    
    body {
        display: block;
    }
    
    .container {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        padding: 0;
        border-radius: 0;
        box-sizing: border-box;
        -webkit-box-sizing: border-box;
        position: relative;
        left: 0;
        right: 0;
        overflow: hidden;
    }
    
    .banner {
        padding: 50px 16px 70px;
        box-sizing: border-box;
    }
    
    .main-content {
        padding: 0 12px;
        box-sizing: border-box;
        width: 100%;
    }
    
    .card {
        padding: 20px 16px;
        border-radius: 16px;
        box-sizing: border-box;
        width: 100%;
    }
    
    .input-section {
        width: 100%;
        box-sizing: border-box;
    }
    
    .input-wrapper {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 375px) {
    .banner-title {
        font-size: 28px;
    }

    .banner-subtitle {
        font-size: 40px;
    }

    .banner-decoration {
        right: 10px;
    }

    .gift-box {
        width: 100px;
        height: 100px;
    }

    .coupon {
        width: 60px;
        height: 80px;
    }
    
    .banner-tag {
        font-size: 14px;
        padding: 6px 16px;
    }
    
    .card-title {
        font-size: 20px;
    }
    
    .area-code {
        font-size: 20px;
    }
    
    .phone-input, .card-input {
        font-size: 18px;
        padding: 14px 10px;
    }
    
    .claim-btn {
        height: 52px;
        font-size: 18px;
    }
}

@media (min-width: 750px) {
    .container {
        border-radius: 0;
    }
}
