* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding-bottom: 70px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

.search-box {
    flex: 1;
    margin: 0 15px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    outline: none;
    background: rgba(255,255,255,0.2);
    color: white;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.8);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 10px;
    color: #999;
    transition: all 0.3s;
}

.nav-item.active {
    color: #667eea;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
}

.nav-item span {
    font-size: 12px;
}

/* Container */
.container {
    padding: 15px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title .more {
    color: #999;
    font-size: 14px;
    font-weight: normal;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Grid */
.grid {
    display: grid;
    gap: 12px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Tool Item */
.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s;
}

.tool-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 20px;
}

.tool-name {
    font-size: 13px;
    color: #333;
}

/* List Items */
.list-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.list-item:last-child {
    border-bottom: none;
}

.list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    margin-right: 12px;
}

.list-content {
    flex: 1;
}

.list-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.list-desc {
    font-size: 13px;
    color: #999;
}

.list-meta {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

/* Tabs */
.tabs {
    display: flex;
    overflow-x: auto;
    background: white;
    padding: 0 10px;
    margin-bottom: 15px;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex-shrink: 0;
    padding: 12px 16px;
    color: #666;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Swiper */
.swiper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.swiper-slide {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.badge-hot {
    background: #ff6b6b;
    color: white;
}

.badge-new {
    background: #51cf66;
    color: white;
}

/* Form */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #666;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: #667eea;
}

.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* User Profile */
.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    text-align: center;
    color: white;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 12px;
}

.profile-name {
    font-size: 18px;
    font-weight: bold;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 20px;
    font-weight: bold;
}

.profile-stat-label {
    font-size: 12px;
    opacity: 0.9;
}

/* Menu List */
.menu-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-left {
    display: flex;
    align-items: center;
}

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

.menu-text {
    font-size: 15px;
}

.menu-arrow {
    color: #ccc;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Loading */
.loading {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 9999;
    display: none;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: white;
    border-top: 1px solid #f0f0f0;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.action-item.active {
    color: #667eea;
}

/* Tag */
.tag {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f0f0;
    color: #666;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Rank */
.rank-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.rank-number {
    width: 30px;
    text-align: center;
    font-weight: bold;
    color: #999;
}

.rank-number.top-1 {
    color: #ffd700;
}

.rank-number.top-2 {
    color: #c0c0c0;
}

.rank-number.top-3 {
    color: #cd7f32;
}

/* Float Button */
.float-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
    z-index: 50;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
}

.modal-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.modal-body {
    padding: 10px 0;
}

.amount-item {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.amount-item:hover {
    border-color: #667eea;
}

/* AI Status */
.ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
}

.ai-status .dot {
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive */
@media (min-width: 768px) {
    body {
        max-width: 768px;
        margin: 0 auto;
    }
}
