.page-header {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
    border: 1px solid #dbeafe;
}


.page-header p {
    color: #475569;
    font-size: 1.1rem;
    margin: 0;
}






.control-panel {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 40px;
}

.control-panel h3 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.screen-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-label {
    background: #f1f5f9;
    color: #475569;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
}

/* 单选项平铺样式 */
.device-options {
    display: flex;
    gap: 8px;
    align-items: center;
}

.device-option {
    background: #f8fafc;
    color: #475569;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.device-option:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #374151;
}

.device-option.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.width-input {
    width: 120px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
}

.width-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.url-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.url-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.url-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.submit-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.submit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

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

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.api-docs {
    background: #f8fafc;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #e2e8f0;
}

.api-docs h4 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.api-docs p {
    color: #475569;
    margin-bottom: 12px;
    line-height: 1.6;
}

.api-url {
    background: #1e293b;
    color: #fbbf24;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    border: 1px solid #334155;
}

.api-note {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 20px;
}

.api-note h5 {
    color: #0369a1;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1rem;
}

.api-note p {
    color: #0c4a6e;
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.result-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.result-image {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.image-url {
    background: #f1f5f9;
    color: #475569;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .page-header {
        padding: 30px 20px;
    }

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

    .control-panel {
        padding: 30px 20px;
    }

    .screen-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        justify-content: space-between;
    }

    .device-options {
        justify-content: center;
    }

    .url-input-group {
        flex-direction: column;
    }

    .submit-btn {
        width: 100%;
    }
}
