:root {
    --primary-blue: #0c6284;
    --teal: #2fb8a7;
    --dark-gray: #333333;
    --light-green: #68dbab;
    --medium-blue: #4a9fe8;
    --light-blue: #6fbcff;
    --dark-blue: #054863;
    --gray-blue: #76b7d1;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    color: var(--white);
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="60" cy="70" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
}

.header h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

/* Progress bar */
.progress-bar {
    background: rgba(255,255,255,0.2);
    height: 10px;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--light-green), var(--teal));
    transition: width 0.4s ease;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(104, 219, 171, 0.4);
}

/* Step indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    position: relative;
}

.step-number.completed {
    background: var(--light-green);
    box-shadow: 0 0 20px rgba(104, 219, 171, 0.5);
    transform: scale(1.1);
}

.step-number.active {
    background: var(--medium-blue);
    box-shadow: 0 0 15px rgba(74, 159, 232, 0.4);
}

/* Content */
.content {
    padding: 40px;
}

.step-content {
    display: none;
    animation: fadeIn 0.4s ease-in;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-content h2 {
    color: var(--dark-blue);
    font-size: 2.2em;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--light-green);
    position: relative;
}

.step-content h3 {
    color: var(--primary-blue);
    font-size: 1.5em;
    margin: 30px 0 20px 0;
    padding-left: 15px;
    border-left: 4px solid var(--teal);
}

/* Error container */
.error-container {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: none;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.error-container h4 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.error-container ul {
    list-style: none;
    padding-left: 0;
}

.error-container li {
    margin: 5px 0;
    padding-left: 20px;
    position: relative;
}

.error-container li::before {
    content: '•';
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Form groups */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 1.1em;
}

.form-group input,
.form-group textarea,
.form-group select {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--medium-blue);
    background: var(--white);
    box-shadow: 0 0 15px rgba(74, 159, 232, 0.2);
    transform: translateY(-2px);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #ff6b6b;
    background: #fff5f5;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.2);
}

.form-group small {
    color: var(--gray-blue);
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
    font-style: italic;
}

.form-flex{
    display: flex;
    justify-content:space-between;
}

/* Radio groups */
.radio-group {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.radio-option {
    flex: 1;
    min-width: 200px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fafafa, #f0f0f0);
    position: relative;
    overflow: hidden;
}

.radio-option label{
    padding: 20px;
}

.radio-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.radio-option:hover::before {
    left: 100%;
}

.radio-option:hover {
    border-color: var(--medium-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 159, 232, 0.3);
}

.radio-option.selected {
    border-color: var(--light-green);
    background: linear-gradient(135deg, var(--light-green), var(--teal));
    color: white;
    box-shadow: 0 10px 30px rgba(104, 219, 171, 0.4);
    transform: translateY(-3px);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option label {
    font-weight: 600;
    font-size: 1.2em;
    cursor: pointer;
    margin: 0;
    color: inherit;
}

/* Conditional fields */
.conditional-fields {
    display: flex;
    justify-content: space-between;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.conditional-fields.show {
    max-height: 1000px;
    opacity: 1;
    padding-top: 20px;
}

/* Error messages */
.error-message {
    color: #ff6b6b;
    font-size: 0.9em;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff5f5;
    border-radius: 6px;
    border-left: 4px solid #ff6b6b;
    display: none;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(-5px);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(5px);
    }
}

/* Preview section */
.preview-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border: 2px solid var(--gray-blue);
}

.preview-section h3 {
    color: var(--dark-blue);
    margin-bottom: 20px;
    border-left: none;
    padding-left: 0;
}

.legal-preview {
    max-height: 400px;
    overflow-y: auto;
    padding: 25px;
    background: var(--white);
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 0.95em;
    line-height: 1.7;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
}

.legal-preview h1 {
    color: var(--dark-blue);
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid var(--light-green);
    padding-bottom: 10px;
}

.legal-preview h2 {
    color: var(--primary-blue);
    font-size: 1.3em;
    margin: 25px 0 15px 0;
}

.legal-preview p {
    margin-bottom: 15px;
    text-align: justify;
}

.legal-preview em {
    color: var(--gray-blue);
    font-size: 0.9em;
}

/* Success message */
.success-message {
    background: linear-gradient(135deg, var(--light-green), var(--teal));
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    display: none;
    box-shadow: 0 10px 30px rgba(104, 219, 171, 0.4);
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-message h4 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    gap: 20px;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--medium-blue), var(--light-blue));
    color: white;
    box-shadow: 0 8px 20px rgba(74, 159, 232, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(74, 159, 232, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-blue), var(--primary-blue));
    color: white;
    box-shadow: 0 8px 20px rgba(118, 183, 209, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(118, 183, 209, 0.6);
}

.btn:disabled {
    background: #cccccc;
    color: #888888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled::before {
    display: none;
}

.btn:active {
    transform: translateY(-1px);
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 10px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 2.2em;
    }
    
    .content {
        padding: 30px 20px;
    }
    
    .step-content h2 {
        font-size: 1.8em;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .radio-option {
        min-width: auto;
    }
    
    .navigation {
        flex-direction: column-reverse;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .step-indicator {
        gap: 10px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }
    
    .preview-section {
        padding: 20px;
    }
    
    .legal-preview {
        padding: 15px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .header p {
        font-size: 1em;
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
    }
    
    .radio-option {
        padding: 15px;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.8em;
    }
}

/* Custom scrollbar */
.legal-preview::-webkit-scrollbar {
    width: 8px;
}

.legal-preview::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.legal-preview::-webkit-scrollbar-thumb {
    background: var(--gray-blue);
    border-radius: 4px;
}

.legal-preview::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Focus states for accessibility */
.btn:focus,
.radio-option:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--light-blue);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .navigation,
    .preview-section h3 {
        display: none;
    }
    
    .legal-preview {
        max-height: none;
        overflow: visible;
        box-shadow: none;
        border: none;
    }
}

.download-options {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid var(--gray-blue);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    text-align: center;
    display: none;
}

.btn-download.copy {
    background: linear-gradient(135deg, var(--primary-blue), var(--teal));
    color: white;
    box-shadow: 0 8px 20px rgba(74, 159, 232, 0.4);
}

.btn-download.html {
    background: linear-gradient(135deg, var(--teal), var(--primary-blue));
    color: white;
    box-shadow: 0 8px 20px rgba(74, 159, 232, 0.4);
}
