/* frontend/css/style.css */
/* 默认浅色主题 */
:root {
    /* Core Colors - Light Theme (Default) */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(241, 245, 249, 0.8);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent-primary: #1890ff;
    --accent-secondary: #40a9ff;
    --accent-gradient: linear-gradient(135deg, #096dd9 0%, #1890ff 100%);

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #1890ff;

    --border-color: rgba(148, 163, 184, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(24, 144, 255, 0.35);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 深色主题覆盖 */
.dark-theme {
    --bg-primary: #0a0f1a;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-glass: rgba(15, 23, 42, 0.6);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(148, 163, 184, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    background: linear-gradient(to bottom, var(--bg-primary), transparent);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.brand-text h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 16px;
}

.btn-icon:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(24, 144, 255, 0.1);
}

.btn-primary {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--accent-primary);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.35);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
    background: #096dd9;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-accent {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.45);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-download-large {
    margin-top: 8px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-download-large:hover {
    background: var(--accent-secondary);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.45);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-bottom: 100px;
}

.hero-section {
    margin-top: 8px;
}

.info-card {
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--accent-primary);
    font-size: 18px;
    font-weight: 600;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.info-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(24, 144, 255, 0.1);
    border: 1px solid rgba(24, 144, 255, 0.2);
    border-radius: 20px;
    font-size: 13px;
    color: var(--accent-primary);
    font-weight: 500;
}

/* PBE 皮肤展示样式 */
.skin-preview-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title i {
    font-size: 20px;
    color: var(--accent-primary);
}

.header-title h2 {
    font-size: 20px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.skin-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/10;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.skin-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.skin-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.skin-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.skin-badge.adapted {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.skin-badge.not-adapted {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.skin-price {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.skin-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #fff;
}

.skin-name {
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    margin-bottom: 8px;
}

.skin-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.skin-actions .btn-skin {
    padding: 4px 12px;
    font-size: 11px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.btn-download {
    background: rgba(24, 144, 255, 0.9);
    color: white;
}

.btn-download:hover {
    background: #1890ff;
    transform: scale(1.02);
}

.btn-download:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-apply {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.btn-apply:hover {
    background: #10b981;
    transform: scale(1.02);
}

.btn-apply:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

/* Operation Section */
.operation-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.operation-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .operation-grid {
        grid-template-columns: 1fr;
    }
}

.op-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    transition: all var(--transition-base);
}

.op-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.op-card.featured {
    border: 1px solid rgba(245, 158, 11, 0.3);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(249, 115, 22, 0.05) 100%);
}

.op-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.op-icon.pulse {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(249, 115, 22, 0.2) 100%);
    color: #f59e0b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(245, 158, 11, 0); }
}

.op-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.op-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-group {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.input-field {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
}

.input-field:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.15);
}

.input-field::placeholder {
    color: var(--text-muted);
}

/* Management Section */
.management-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.badge {
    padding: 4px 12px;
    background: var(--accent-primary);
    color: white;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
    transition: transform 0.2s ease;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 24px;
}

@media (max-width: 640px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

.hero-card-wrapper {
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    transition: all var(--transition-base);
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hero-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    text-transform: uppercase;
}

.hero-info {
    flex: 1;
    min-width: 0;
}

.hero-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-delete-hero {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.btn-delete-hero:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
}

.hero-input-row {
    width: 100%;
}

.input-wrap {
    position: relative;
    width: 100%;
}

.input-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-wrap .input-field {
    padding-left: 44px;
}

.skins-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skins-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.skins-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.skins-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.skin-item {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.25s ease;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 12px;
}

.skin-item:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(24, 144, 255, 0.25);
    transform: translateX(4px);
}

.light-theme .skin-item {
    background: rgba(241, 245, 249, 0.6);
}

.light-theme .skin-item:hover {
    background: rgba(255, 255, 255, 0.9);
}

.skin-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.skin-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(24, 144, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

.skin-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.format-hint {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
    font-weight: 400;
}

.skin-options {
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.toggle-switch {
    width: 48px;
    height: 26px;
    background: var(--bg-tertiary);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.toggle-switch.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.toggle-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-thumb {
    transform: translateX(22px);
}

.empty-skins {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    gap: 12px;
}

.empty-skins i {
    font-size: 32px;
    opacity: 0.5;
}

.fab-container {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 90;
}

.btn-fab {
    padding: 16px 32px;
    border-radius: 50px;
    border: none;
    background: var(--accent-primary);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(24, 144, 255, 0.4);
    transition: all var(--transition-base);
}

.btn-fab:hover {
    background: var(--accent-secondary);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(24, 144, 255, 0.5);
}

.duplicate-warning {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    font-size: 12px;
    color: #f59e0b;
    font-weight: 500;
    margin-top: 6px;
}

.hero-card.duplicate {
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.hero-id-input.duplicate {
    border-color: #f59e0b !important;
}

@media (max-width: 640px) {
    .app-container {
        padding: 0 16px;
    }
    .brand-text h1 {
        font-size: 20px;
    }
    .skin-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    .fab-container {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }
    .btn-fab {
        width: 100%;
        justify-content: center;
    }
}

/* 下载状态标识 */
.skin-meta .need-download {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
}

.skin-meta .local-file {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
}

/* ==============================================
   移动端适配补丁 - 仅手机生效，电脑端完全不变
============================================== */
@media (max-width: 768px) {
    .app-container {
        padding: 0 16px;
    }

    .top-nav {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 0;
    }

    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .brand-text h1 {
        font-size: 20px;
    }

    .nav-actions {
        margin-left: auto;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .skin-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .input-group {
        flex-direction: column;
    }

    .operation-grid {
        grid-template-columns: 1fr;
    }

    .fab-container {
        left: 20px;
        right: 20px;
    }
    
    .btn-fab {
        width: 100%;
        justify-content: center;
    }

    .info-card,
    .op-card,
    .hero-card {
        padding: 20px;
    }

    .skin-item {
        padding: 16px;
    }

    body, .app-container, .main-content {
        overflow-x: hidden;
        width: 100%;
    }

    .skin-actions {
        gap: 6px;
    }
    
    .skin-actions .btn-skin {
        padding: 5px 10px;
        font-size: 12px;
        flex: 0 0 auto;
    }
}

@media (max-width: 480px) {
    .skin-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== Toast 通知系统 ==================== */
/* Toast 容器 - 强制居中 */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    width: auto;
    max-width: 90vw;
}

/* Toast 消息样式 */
.toast-message {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background: #fff;
    color: #333;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    width: auto;
    min-width: 200px;
    max-width: 500px;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.5;
    position: relative;
}

/* 长文本样式 */
.toast-message.long-text {
    max-width: 600px;
}

.toast-message.very-long-text {
    max-width: 700px;
}

/* 文本容器 */
.toast-message span {
    flex: 1;
    line-height: 1.4;
}

/* 图标样式 */
.toast-message i {
    flex-shrink: 0;
    font-size: 16px;
}

/* 显示动画 */
.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* 滑入动画 */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滑出动画 */
@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
        margin-bottom: 10px;
    }
    to {
        opacity: 0;
        transform: translateY(30px);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* 不同类型背景色 */
.toast-message.success { background: #10b981; color: #fff; }
.toast-message.error { background: #ef4444; color: #fff; }
.toast-message.warning { background: #f59e0b; color: #fff; }
.toast-message.loading { background: #3b82f6; color: #fff; }
.toast-message.info { background: #1890ff; color: #fff; }

/* 深色主题覆盖 */
.dark-theme .toast-message:not(.success):not(.error):not(.warning):not(.loading):not(.info) {
    background: #1e1e2e;
    color: #eee;
}

/* 关闭按钮样式 */
.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    margin-left: 12px;
    opacity: 0.7;
    font-size: 12px;
    padding: 4px;
    transition: opacity 0.2s;
    flex-shrink: 0;
    border-radius: 4px;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        max-width: calc(100% - 20px);
    }
    
    .toast-message {
        max-width: calc(100vw - 40px);
        min-width: 280px;
    }
    
    .toast-message.long-text,
    .toast-message.very-long-text {
        max-width: calc(100vw - 40px);
    }
}