* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f4f7fc;
    color: #1a1e2b;
    line-height: 1.5;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1300px;
    width: 100%;
    background: white;
    border-radius: 42px;
    box-shadow: 0 25px 70px -12px rgba(0, 0, 0, 0.10), 0 8px 28px -6px rgba(0, 0, 0, 0.02);
    padding: 2.5rem 2.2rem;
    transition: all 0.2s ease;
}

.header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 620;
    letter-spacing: -0.02em;
    background: linear-gradient(145deg, #0b1b33, #1f3a5f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.1rem;
}

.header .subhead {
    font-size: 1rem;
    color: #4a5a72;
    font-weight: 400;
}

.header .subhead span {
    background: #eef2f7;
    padding: 0.1rem 0.9rem;
    border-radius: 40px;
    font-size: 0.8rem;
    color: #1f3a5f;
    margin-left: 0.5rem;
    font-weight: 500;
}

.stats {
    font-size: 0.9rem;
    color: #4f6a88;
    background: #f0f5fe;
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    border: 1px solid #dde6f2;
    white-space: nowrap;
}

.ai-nav {
    background: linear-gradient(135deg, #e8f0fe, #d4e4f7);
    border-radius: 16px;
    padding: 0.8rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem 1.5rem;
    border: 1px solid #c5d8ed;
}

.ai-nav .ai-label {
    font-weight: 600;
    color: #1f3a5f;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ai-nav .ai-label .sparkle {
    font-size: 1.2rem;
}

.ai-nav .ai-desc {
    color: #3a5a7a;
    font-size: 0.9rem;
    flex: 1;
    min-width: 150px;
}

.ai-nav .ai-link {
    background: #1f3a5f;
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: 1px solid #1f3a5f;
    white-space: nowrap;
}

.ai-nav .ai-link:hover {
    background: #2a4a75;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 58, 95, 0.25);
}

.main-area {
    margin-bottom: 2.8rem;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3b5777;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-title .badge {
    font-size: 0.6rem;
    background: #eef3fa;
    padding: 0.1rem 0.7rem;
    border-radius: 30px;
    color: #4a6a8a;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.3px;
}

.section-title .badge.international {
    background: #dce8f5;
    color: #1f4a7a;
}

.section-subtitle {
    font-size: 0.8rem;
    color: #6a7f9b;
    margin-bottom: 0.8rem;
    padding-left: 0.2rem;
    opacity: 0.8;
    font-weight: 400;
}

.section-divider {
    height: 1px;
    background: linear-gradient(to right, #e5edf5, transparent);
    margin: 0.5rem 0 1.5rem 0;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    min-height: 60px;
}

.btn-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    background: #fafdff;
    border-radius: 60px;
    padding: 0.5rem 0.5rem 0.5rem 1.2rem;
    border: 1px solid #e5edf5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    min-height: 64px;
    text-decoration: none;
    color: #0b1b33;
    font-weight: 550;
    font-size: 1.1rem;
    letter-spacing: 0.2px;
    position: relative;
    gap: 0.3rem;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.btn-card:active {
    cursor: grabbing;
}

.btn-card.dragging {
    opacity: 0.3;
    transform: scale(0.92);
    cursor: grabbing;
    z-index: 1;
}

.btn-card.drag-over {
    border-color: #4a8bc2;
    background: #e3edf9;
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(26, 80, 140, 0.15);
}

.btn-card:hover:not(.dragging) {
    transform: translateY(-3px);
    background: #f0f6ff;
    border-color: #b3c9e0;
    box-shadow: 0 12px 24px -10px rgba(18, 52, 77, 0.12);
}

.btn-card .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.2;
    flex: 1;
    pointer-events: none;
    min-width: 0;
}

.btn-card .btn-main {
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.2px;
}

.btn-card .btn-sub {
    display: block;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6f85a0;
    margin-top: 1px;
    font-weight: 450;
    opacity: 0.7;
}

.drag-handle {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #d0dbe8;
    border-radius: 4px;
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.2s;
}

.btn-card:hover .drag-handle {
    opacity: 0.7;
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #eef3fa;
    color: #2f4d74;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.action-btn:hover {
    background: #d4e0ef;
    transform: scale(1.08);
}

.action-btn.hide-btn:hover {
    background: #fcd9d9;
    color: #b33636;
}

.action-btn.show-btn {
    background: #d8e8d8;
    color: #1f6b3b;
}

.action-btn.show-btn:hover {
    background: #b8d9b8;
    color: #0f4f2a;
}

.trash-zone {
    margin-top: 2rem;
    border-top: 2px dashed #d7e0eb;
    padding-top: 1.8rem;
    background: #fafcfe;
    border-radius: 32px;
    padding: 1.8rem 1.5rem 1.5rem;
    transition: background 0.2s;
    min-height: 100px;
}

.trash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.trash-header .trash-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6a7f9b;
    letter-spacing: 0.5px;
}

.trash-header .trash-count {
    background: #e9eef5;
    padding: 0.1rem 0.9rem;
    border-radius: 30px;
    font-size: 0.75rem;
    color: #2f4d74;
}

.trash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
}

.trash-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 60px;
    padding: 0.4rem 0.4rem 0.4rem 1.2rem;
    border: 1px solid #e8eef6;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f3a5f;
    transition: all 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.02);
    gap: 0.3rem;
}

.trash-item:hover {
    background: #f5f9ff;
    border-color: #c7d7e9;
}

.trash-item .item-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trash-item .action-btn {
    width: 30px;
    height: 30px;
    font-size: 1rem;
}

.empty-trash {
    color: #8a9bb0;
    font-size: 0.9rem;
    padding: 0.8rem 0;
    text-align: center;
    grid-column: 1 / -1;
}

.footer {
    margin-top: 2.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid #eef2f7;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    color: #4b5b70;
    font-size: 0.85rem;
}

.footer a {
    color: #1f3a5f;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
}

.footer a:hover {
    border-bottom-color: #1f3a5f;
}

.footer .beian {
    font-size: 0.75rem;
    color: #8a9bb0;
    opacity: 0.7;
    text-align: center;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eef2f7;
}

.footer .beian a {
    color: #4a6a8a;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
}

.footer .beian a:hover {
    border-bottom-color: #4a6a8a;
}

.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.9;
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-color: #4a8bc2;
    background: #ffffff;
    border-radius: 60px;
    padding: 0.5rem 0.5rem 0.5rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    min-height: 64px;
    font-weight: 550;
    font-size: 1.1rem;
    color: #0b1b33;
    border: 2px solid #4a8bc2;
}

.drag-ghost .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.2;
    flex: 1;
    min-width: 0;
}

.drag-ghost .btn-main {
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.2px;
}

.drag-ghost .btn-sub {
    display: block;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6f85a0;
    margin-top: 1px;
    font-weight: 450;
    opacity: 0.7;
}

.drag-ghost .action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #eef3fa;
    color: #2f4d74;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
    opacity: 0.5;
}

.drag-hint {
    display: inline-block;
    font-size: 0.7rem;
    color: #8a9bb0;
    margin-left: 0.5rem;
    font-weight: 400;
}

@media (max-width: 700px) {
    body { padding: 1rem 0.6rem; }
    .container { padding: 1.5rem 1rem; border-radius: 28px; }
    .header h1 { font-size: 2rem; }
    .button-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .trash-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .btn-card { padding: 0.4rem 0.4rem 0.4rem 0.9rem; min-height: 56px; font-size: 1rem; }
    .btn-card .btn-main { font-size: 1rem; }
    .action-btn { width: 30px; height: 30px; font-size: 1rem; }
    .drag-handle { display: none; }
    .drag-ghost { padding: 0.4rem 0.4rem 0.4rem 0.9rem; min-height: 56px; font-size: 1rem; }
    .ai-nav { flex-direction: column; align-items: stretch; text-align: center; padding: 1rem; }
    .ai-nav .ai-link { align-self: center; }
}

@media (max-width: 480px) {
    .button-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
    .trash-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .stats { align-self: flex-start; }
    .ai-nav .ai-desc { font-size: 0.8rem; }
}

@media (max-width: 380px) {
    .button-grid { grid-template-columns: 1fr; }
    .trash-grid { grid-template-columns: 1fr; }
}