﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-gradient-hover: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 16px;
    color: var(--text-primary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    body {
        padding: 8px;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    background: var(--primary-gradient);
    color: white;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 15px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .header {
        padding: 32px 24px;
    }
    .header h1 {
        font-size: 24px;
    }
    .header p {
        font-size: 14px;
    }
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.status-badge.running {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.waiting {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-badge.completed {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
}

@media (max-width: 768px) {
    .content {
        padding: 20px;
        gap: 20px;
    }
}

.panel {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.panel:hover {
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .panel {
        padding: 20px;
    }
}

.panel h2 {
    font-size: 20px;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.panel-header h2 {
    margin-bottom: 0;
}

.status-items {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
}

.form-row .form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-row .form-group select {
    width: 100%;
}

@media (max-width: 768px) {
    .form-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .form-row .form-group {
        flex: 1 1 calc(50% - 5px);
        min-width: calc(50% - 5px);
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .form-row .form-group {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.file-input-wrapper {
    margin-bottom: 10px;
}

.file-input-label-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.file-input-label-row label {
    margin-bottom: 0;
    white-space: nowrap;
}

.file-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-count {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.prompt-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.prompt-input-wrapper input {
    flex: 1;
}

.prompt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.prompt-btn {
    padding: 10px 18px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.prompt-btn:hover {
    background: var(--bg-secondary);
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.prompt-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="file"] {
    padding: 8px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

#image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    width: 100%;
    box-sizing: border-box;
    align-content: start;
}

.image-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
    cursor: pointer;
    transition: var(--transition);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.image-preview-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.image-preview-item:hover img {
    transform: scale(1.05);
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.image-preview-item .remove-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.15) rotate(90deg);
    box-shadow: var(--shadow-md);
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    cursor: pointer;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image-modal-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: white;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.image-modal-close:hover {
    background: rgba(239, 68, 68, 0.9);
    border-color: rgba(239, 68, 68, 0.9);
    transform: scale(1.1) rotate(90deg);
}

.image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
    user-select: none;
}

.image-modal-nav:hover:not(.disabled) {
    background: rgba(102, 126, 234, 0.9);
    border-color: rgba(102, 126, 234, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.image-modal-nav.prev {
    left: 24px;
}

.image-modal-nav.next {
    right: 24px;
}

.image-modal-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-modal-nav.disabled:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-50%);
}

.image-modal-counter {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-progress-wrapper {
    position: relative;
    height: 240px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 60px 12px 0;
    white-space: nowrap;
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .image-progress-wrapper {
        height: 200px;
        padding: 12px 40px 12px 0;
    }
    .image-progress-item {
        width: 180px;
        height: 180px;
    }
}

.image-progress-wrapper::-webkit-scrollbar {
    height: 8px;
}

.image-progress-wrapper::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.image-progress-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: var(--transition);
}

.image-progress-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.image-progress-container {
    display: inline-flex;
    gap: 16px;
    padding: 0 12px 0 8px;
}

.image-progress-item {
    position: relative;
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    transition: var(--transition);
    cursor: pointer;
}

/* 宸插畬鎴愮殑浠诲姟鎮仠鏃舵樉绀虹豢鑹茶竟妗?*/
.image-progress-item.completed:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #22c55e;
}

/* 绛夊緟鍜屽鐞嗕腑鐨勪换鍔℃偓鍋滄椂涓嶆敼鍙樿竟妗嗛鑹?*/
.image-progress-item.loading:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

/* 鎵€鏈夊崱鐗囨偓鍋滄椂鏄剧ず鍒犻櫎鎸夐挳 */
.image-progress-item:hover .image-progress-delete {
    display: flex;
}

.image-progress-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 220px;
    width: 100%;
    color: var(--text-secondary);
    font-size: 14px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.image-progress-empty svg {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.image-progress-download {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    padding: 10px 16px;
    background: rgba(59, 130, 246, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.image-progress-item.completed:hover .image-progress-download {
    display: flex;
}

.image-progress-download:hover {
    background: rgba(37, 99, 235, 1);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.image-progress-download:active {
    transform: translateX(-50%) scale(0.98);
}

/* 浼樺寲鎸夐挳鏍峰紡 */
.image-progress-optimize {
    position: absolute;
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    padding: 10px 16px;
    background: rgba(34, 197, 94, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 25;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.image-progress-item:hover .image-progress-optimize {
    display: flex;
}

.image-progress-optimize:hover {
    background: rgba(22, 163, 74, 1);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.image-progress-optimize:active {
    transform: translateX(-50%) scale(0.98);
}

.image-progress-optimize:disabled {
    background: rgba(156, 163, 175, 0.6);
    cursor: not-allowed;
    opacity: 0.6;
}

/* 鍒犻櫎鎸夐挳 - 鍦ㄥ浘鐗囧彸涓婅 */
.image-progress-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: 300;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: var(--transition);
    line-height: 1;
    box-shadow: var(--shadow-md);
}

.image-progress-delete:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.15) rotate(90deg);
    box-shadow: var(--shadow-lg);
}

.image-progress-delete:active {
    transform: scale(0.95);
}

.image-progress-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    z-index: 10;
    transition: var(--transition);
}

.image-progress-nav:hover:not(.disabled) {
    background: rgba(102, 126, 234, 0.9);
    border-color: rgba(102, 126, 234, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-md);
}

.image-progress-nav:active:not(.disabled) {
    transform: translateY(-50%) scale(0.95);
}

.image-progress-nav.prev {
    left: 12px;
}

.image-progress-nav.next {
    right: 12px;
}

.image-progress-nav.disabled {
    background: rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
    opacity: 0.4;
}

.image-progress-nav.disabled:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: translateY(-50%);
    box-shadow: none;
}

.image-progress-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.image-progress-item.grayed {
    filter: grayscale(80%);
    opacity: 0.7;
}

/* 浼樺寲鐘舵€佽鐩栧眰 */
.optimizing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 15;
    border-radius: var(--radius-md);
}

.optimizing-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.optimizing-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
}

.optimizing-status {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(34, 197, 94, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 16;
    box-shadow: var(--shadow-md);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.image-progress-item .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-md);
}

.image-progress-item:not(.loading) .loading-overlay {
    display: none;
}

.loading-dots {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) {
    animation-delay: 0s;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    30% {
        transform: scale(1.4);
        opacity: 1;
    }
}

.image-progress-status {
    color: white;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    padding: 0 12px;
}

.scrollbar-custom::-webkit-scrollbar {
    width: 8px;
}

.scrollbar-custom::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.scrollbar-custom::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: var(--transition);
}

.scrollbar-custom::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Toast 娑堟伅妗嗘牱寮?*/
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

@media (max-width: 768px) {
    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }
}

.toast {
    min-width: 320px;
    max-width: 500px;
    padding: 16px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.toast.success {
    color: #22c55e;
}

.toast.error {
    color: #ef4444;
}

.toast.warning {
    color: #f59e0b;
}

.toast.info {
    color: #3b82f6;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    border-radius: 4px;
}

.toast-close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(calc(100% + 40px));
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(calc(100% + 40px));
        opacity: 0;
    }
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}
