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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
}

.main-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.form-column {
    flex: 1;
    min-width: 0;
}

.form-section, .output-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.workflow-sidebar {
    width: 350px;
    flex-shrink: 0;
}

.workflow-sticky {
    position: sticky;
    top: 20px;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.workflow-sticky h2 {
    margin-bottom: 15px;
    color: #667eea;
    font-size: 1.3rem;
}

.workflow-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.workflow-tab {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.workflow-tab:hover {
    background-color: #e9ecef;
}

.workflow-tab.active {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

.workflow-content.hidden {
    display: none;
}

.workflow-item {
    margin-bottom: 25px;
}

.workflow-item h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}

.workflow-copy-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.workflow-text {
    flex: 1;
    font-size: 14px;
}

.workflow-step {
    margin-bottom: 10px;
}

.workflow-checkbox {
    font-size: 18px;
    min-width: 20px;
    color: #666;
}

.workflow-label {
    flex: 1;
    font-size: 13px;
    color: #333;
}

.form-section h2, .output-section h2 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    cursor: pointer;
}

.password-input {
    display: flex;
    gap: 10px;
}

.password-input input {
    flex: 1;
}

.password-length-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.password-length-control label {
    font-size: 13px;
    color: #666;
    min-width: 70px;
}

.password-length-control input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.password-length-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.password-length-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.btn-regenerate {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s;
}

.btn-regenerate:hover {
    background-color: #e0e0e0;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.output-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.output-left-column,
.output-right-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.output-card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.output-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.btn-copy {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-copy:hover {
    background-color: #218838;
}

.output-content {
    padding: 15px;
    background-color: #fafafa;
}

.output-row {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    gap: 10px;
}

.output-row:last-child {
    border-bottom: none;
}

.output-label {
    font-weight: 600;
    min-width: 100px;
    color: #555;
}

.output-value {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-word;
}

.btn-copy-small {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.btn-copy-small:hover {
    background-color: #5a6268;
}

.email-preview {
    background-color: white;
}

.email-subject {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-subject span {
    flex: 1;
}

.email-body {
    padding: 20px;
    font-family: Arial, sans-serif;
    background-color: white;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    z-index: 1000;
    transition: opacity 0.3s;
}

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

.notification.error {
    background-color: #dc3545;
    color: white;
}

.notification.info {
    background-color: #17a2b8;
    color: white;
}

.hidden {
    display: none;
}

@media (max-width: 1400px) {
    .main-layout {
        flex-direction: column;
    }

    .workflow-sidebar {
        width: 100%;
    }

    .workflow-sticky {
        position: static;
    }
}

@media (max-width: 1024px) {
    .output-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .form-section, .output-section {
        padding: 20px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .notification {
        left: 10px;
        right: 10px;
    }
}
