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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f0f4f8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 900px;
    width: 100%;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    padding: 40px 35px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #4a5568;
    font-size: 16px;
    margin-bottom: 35px;
    border-left: 4px solid #4299e1;
    padding-left: 16px;
}

.generator-card {
    background: #f7fafc;
    border-radius: 16px;
    padding: 28px 25px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s ease;
}

.generator-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.generator-card h2 {
    font-size: 20px;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.generator-card h2 span {
    background: #4299e1;
    color: white;
    font-size: 14px;
    font-weight: 400;
    padding: 2px 12px;
    border-radius: 20px;
}

.control-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px 20px;
    margin-bottom: 18px;
}

.control-group label {
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group input[type="number"],
.control-group select {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.15s;
}

.control-group input[type="number"]:focus,
.control-group select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.control-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4299e1;
    cursor: pointer;
}

.btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 10px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:hover {
    background: #3182ce;
}

.btn:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: #edf2f7;
    color: #2d3748;
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.output-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 22px;
    font-size: 15px;
    line-height: 1.7;
    color: #1a202c;
    min-height: 80px;
    max-height: 300px;
    overflow-y: auto;
    word-break: break-word;
    white-space: pre-wrap;
    font-family: 'Segoe UI', ui-monospace, 'SF Mono', Menlo, monospace;
    position: relative;
}

.output-box .copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.04);
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #4a5568;
    cursor: pointer;
    transition: background 0.15s;
}

.output-box .copy-btn:hover {
    background: rgba(0,0,0,0.08);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.badge {
    display: inline-block;
    background: #ebf8ff;
    color: #2b6cb0;
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.footer {
    margin-top: 25px;
    font-size: 14px;
    color: #718096;
    text-align: center;
    border-top: 1px solid #edf2f7;
    padding-top: 25px;
}

@media (max-width: 640px) {
    .container {
        padding: 20px 16px;
    }
    .control-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .control-group label {
        flex-wrap: wrap;
    }
    .output-box {
        font-size: 14px;
        padding: 16px;
    }
}
