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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 3rem 1rem 2rem;
    color: #1f2937;
    line-height: 1.5;
}

.app {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 .highlight {
    color: white;
    text-shadow: 0 2px 8px rgba(255,255,255,0.3);
}


.card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.card:last-child {
    margin-bottom: 0;
}

.card-title {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0.75rem;
}

.update-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.update-log-item {
    border-left: 4px solid #4f46e5;
    padding-left: 1rem;
    position: relative;
}

.update-log-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 8px;
    width: 8px;
    height: 8px;
    background: #4f46e5;
    border-radius: 50%;
}

.update-version {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.update-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.update-feature {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0.25rem 0;
}

.mode-selector {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
    transition: color 0.2s;
}

.radio-label:hover {
    color: #4f46e5;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.2s;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #4f46e5;
    background: #4f46e5;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.key-section {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.key-section.hidden {
    display: none;
}

.checkbox-wrapper {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #4f46e5;
    border-color: #4f46e5;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.key-input-wrapper {
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.key-input-wrapper.hidden {
    display: none;
}

.key-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: white;
}

.key-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.key-input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.generate-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all 0.2s;
    font-size: 1rem;
}

.generate-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.key-group {
    margin-bottom: 1.5rem;
}

.key-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.key-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    resize: vertical;
    transition: border-color 0.2s;
    background: white;
    margin-bottom: 0.5rem;
}

.key-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.file-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.file-input:hover {
    border-color: #4f46e5;
    background: #f0f9ff;
}

.text-section {
    margin-bottom: 2rem;
}

.textarea-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.main-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s;
    background: white;
    font-family: inherit;
    line-height: 1.5;
}

.main-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.paste-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    opacity: 0.9;
}

.paste-btn:hover {
    background: #f8fafc;
    border-color: #4f46e5;
    color: #4f46e5;
    transform: translate(-50%, -50%) translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    opacity: 1;
}

.paste-btn:active {
    transform: translate(-50%, -50%) translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: white;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 300px;
    word-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.notification-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 2rem 0.5rem 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .update-version {
        font-size: 1rem;
    }
    
    .update-feature {
        font-size: 0.85rem;
    }
    
    .mode-selector {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .button-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .key-textarea {
        min-height: 80px;
        font-size: 0.8rem;
    }
    
    .main-textarea {
        min-height: 100px;
        padding-right: 2.5rem;
    }
    
    .paste-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1.5rem 0.5rem 0.5rem;
    }
    
    .header h1 {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .update-list {
        gap: 1rem;
    }
    
    .update-log-item {
        padding-left: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .key-section {
        padding: 1rem;
    }
    
    .key-textarea {
        min-height: 60px;
    }
    
    .main-textarea {
        min-height: 80px;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}
