* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    color: #333;
    padding: 12px;
    min-height: 100vh;
    padding-bottom: 30px;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 15px;
    padding-top: 5px;
    transition: all 0.3s ease;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    font-weight: 700;
}

.header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.search-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.search-box {
    display: flex;
    margin-bottom: 15px;
    gap: 0;
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #3498db;
    border-radius: 50px 0 0 50px;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
    background: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.search-btn, .reset-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.search-btn {
    border-radius: 0;
}

.reset-btn {
    background: #e74c3c;
    border-radius: 0 50px 50px 0;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.search-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.reset-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.search-btn:active, .reset-btn:active {
    transform: scale(0.98);
}

.result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.result-item.active {
    background-color: #e3f2fd;
    font-weight: bold;
    color: #2980b9;
}

.settings {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.setting-item {
    flex: 1 0 auto;
    min-width: 120px;
}

.setting-label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.toggle-container {
    display: flex;
    background: #f1f1f1;
    border-radius: 20px;
    overflow: hidden;
}

.toggle-btn {
    flex: 1;
    padding: 8px;
    text-align: center;
    background: #ddd;
    color: #666;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: #3498db;
    color: white;
}

.cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s ease;
}

.card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.card-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.card-header:hover::before {
    left: 100%;
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-header .sequence {
    background: white;
    color: #2c3e50;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease-out;
}

.card.active .card-content {
    padding: 24px;
    max-height: 1000px;
}

.info-group {
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #3498db;
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-group h3 {
    font-size: 1rem;
    color: #e74c3c;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.info-group h3 i {
    color: #3498db;
    font-size: 1.1rem;
}

.info-content {
    background: white;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.back-to-top i {
    font-size: 1.2rem;
}

.search-mode .header,
.search-mode .cards-container .card:not(.search-result) {
    display: none;
}

.search-result-container {
    display: none;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-mode .search-result-container {
    display: block;
}

.search-result-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-title i {
    color: #3498db;
}

@media (max-width: 768px) {
    .general-tips {
        margin: 20px 0 15px;
    }
    
    .tips-header {
        padding: 5px 8px;
    }
    
    .tips-header h2 {
        font-size: 1.2rem;
        gap: 8px;
    }
    
    .tips-content {
        padding: 18px;
    }
    
    .tip-item {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .tip-item h3 {
        font-size: 1rem;
        gap: 8px;
    }
    
    .tip-item p {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .tips-toggle {
        right: 18px;
        font-size: 1.1rem;
    }
}

@media (max-width: 500px) {
    .search-input, .search-btn, .reset-btn {
        padding: 14px 18px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .settings {
        flex-direction: column;
        gap: 8px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    .general-tips {
        margin: 15px 0 10px;
    }
    
    .tips-header {
        padding: 2px 5px;
    }
    
    .tips-header h2 {
        font-size: 1.1rem;
        gap: 6px;
    }
    
    .tips-content {
        padding: 15px;
    }
    
    .tip-item {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .tip-item h3 {
        font-size: 0.95rem;
        gap: 6px;
    }
    
    .tip-item p {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
        
        .tips-toggle {
            right: 15px;
            font-size: 1rem;
        }
}

.app-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px 0 10px;
    font-size: 0.8rem;
    margin-top: 10px;
}

.general-tips {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    margin: 30px 0 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.tips-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 8px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tips-header:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.tips-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.tips-header i.fas.fa-lightbulb {
    font-size: 1.3rem;
    color: #f39c12;
}

.tips-toggle {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.general-tips.collapsed .tips-toggle {
    transform: translateY(-50%) rotate(180deg);
}

.tips-content {
    padding: 24px;
    max-height: 1000px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.general-tips.collapsed .tips-content {
    max-height: 0;
    padding: 0 24px;
}

.tip-item {
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px;
    border-left: 4px solid #e74c3c;
    transition: all 0.3s ease;
}

.tip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tip-item:last-of-type {
    margin-bottom: 0;
}

.tip-item h3 {
    font-size: 1.1rem;
    color: #e74c3c;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.tip-item h3 i {
    color: #3498db;
    font-size: 1rem;
}

.tip-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2c3e50;
    margin: 0;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}


.search-mode .general-tips {
    display: none;
}

/* Watermark */
.watermark {
    position: fixed;
    bottom: 25px;
    left: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 42px;
    pointer-events: none;
    z-index: 999;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Reward Button & Container */
.reward-container {
    position: fixed;
    right: 0;
    top: 70%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    z-index: 1000;
}

.reward-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.2);
    z-index: 1001;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reward-btn:hover {
    padding-right: 20px;
}

.reward-content {
    background: rgba(255, 255, 255, 0.95);
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0;
    width: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border-radius: 20px 0 0 20px;
    margin-right: -10px;
    white-space: nowrap;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.1);
}

.reward-container.expanded .reward-content {
    width: 340px;
    padding: 0 15px 0 20px;
    margin-right: 0;
}

.reward-container.expanded .reward-btn {
    display: none;
}

.reward-text {
    font-size: 13px;
    color: #333;
    margin-right: 12px;
    font-weight: 500;
}

.sponsor-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.sponsor-btn:hover {
    transform: scale(1.05);
    background: #c0392b;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    max-width: 90%;
    width: 320px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #e74c3c;
    background: #f5f5f5;
}

.modal-title {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.modal-qr {
    width: 100%;
    max-width: 220px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}