/* 全局样式重置 */
* {
    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;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 30px;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: #1e3c72;
    text-align: center;
}

#attackForm {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
}

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

input[type="number"]:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 14px;
}

.result {
    margin-top: 25px;
    padding: 15px;
    border-radius: 6px;
    min-height: 60px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

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

.info-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-section h3 {
    margin-bottom: 15px;
    color: #1e3c72;
    font-size: 1.3rem;
}

.info-section p {
    margin-bottom: 10px;
    line-height: 1.7;
}

.info-section p:last-child {
    margin-bottom: 0;
}

.info-section ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.info-section li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.info-section pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.info-section code {
    font-family: 'Consolas', 'Monaco', monospace;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
        justify-content: flex-start;
    }
    
    .container {
        padding: 20px;
        border-radius: 8px;
        margin-top: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    button {
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* 平滑过渡效果 */
.container,
.form-group,
.info-section,
button,
input,
select,
.result {
    transition: all 0.3s ease;
}

/* 打印样式 */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .container {
        box-shadow: none;
    }
    
    button {
        display: none;
    }
}