/**
 * Infinity插件打包系统 - 样式文件
 * 适配宝塔面板部署环境
 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 容器布局 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

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

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主内容区域 */
.main {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 表单样式 */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

/* 输入框样式 */
input[type="text"],
textarea {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* 单选按钮组 */
.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.radio-label input[type="radio"] {
    margin: 0;
}

.radio-label input[type="radio"]:checked+span {
    color: #667eea;
    font-weight: 600;
}

/* 版本号样式 */
.version {
    color: #dc3545 !important;
    font-weight: 700 !important;
    font-size: 0.9em;
    margin-left: 8px;
    padding: 2px 6px;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* 文件上传样式 */
.icon-upload {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.icon-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-input {
    padding: 8px;
    border: 2px dashed #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.file-input:hover {
    border-color: #667eea;
}

.file-preview {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background-color: #f8f9fa;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

/* 表单操作区域 */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* 状态区域 */
.status-area {
    margin-top: 20px;
}

.loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: #e3f2fd;
    border-radius: 8px;
    color: #1976d2;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e3f2fd;
    border-top: 2px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 消息样式 */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.message-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 下载区域 */
.download-area {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 16px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 32px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
}

.download-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.download-icon {
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.download-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.download-area h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.download-desc {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 500;
    opacity: 0.95;
}

.download-hint {
    font-size: 0.9rem;
    margin-bottom: 25px;
    opacity: 0.8;
}

.download-actions {
    position: relative;
    z-index: 1;
}

.btn-download {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

.btn-download svg {
    transition: transform 0.3s ease;
}

.btn-download:hover svg {
    transform: translateY(2px);
}

/* 右上角通知样式 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #007bff;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    position: relative;
    max-width: 100%;
    word-wrap: break-word;
}

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

.notification.notification-success {
    border-left-color: #28a745;
}

.notification.notification-error {
    border-left-color: #dc3545;
}

.notification.notification-warning {
    border-left-color: #ffc107;
}

.notification.notification-info {
    border-left-color: #17a2b8;
}

.notification-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

.notification-content {
    display: inline-block;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #666;
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 底部样式 */
.footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .main {
        padding: 20px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .icon-upload {
        grid-template-columns: 1fr;
    }

    /* 移动端产品选择调整为单列 */
    .radio-group {
        grid-template-columns: 1fr;
    }

    /* 移动端下载区域优化 */
    .download-area {
        margin-top: 20px;
        padding: 20px;
        border-radius: 12px;
    }

    .download-area h3 {
        font-size: 1.3rem;
    }

    .download-desc {
        font-size: 1rem;
    }

    .btn-download {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* 移动端通知样式调整 */
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .notification {
        margin-bottom: 8px;
        padding: 12px 16px;
    }

    .notification-content {
        font-size: 13px;
    }
}