:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --accent: #FD79A8;
    --bg: #0F0F23;
    --card-bg: rgba(26, 26, 46, 0.8);
    --text: #F5F5F5;
    --text-muted: #B2BEC3;
    --border: rgba(255, 255, 255, 0.1);
    --radius: 12px;
    --glass: rgba(255, 255, 255, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(253, 121, 168, 0.1) 0%, transparent 40%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    color: var(--primary);
    width: 32px;
    height: 32px;
    transition: var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(15deg) scale(1.1);
    color: var(--accent);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo h1 span {
    color: var(--primary);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(108, 92, 231, 0.3);
}

.glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Steps Progress */
.steps-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 0.5rem;
}

.step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.step.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.6);
}

.step.completed {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    max-width: 60px;
}

/* Form Styles */
.step-content h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="url"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.template-card {
    cursor: pointer;
}

.template-card input {
    display: none;
}

.template-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
}

.template-card input:checked + .template-info {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary-light);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.2);
}

.template-info i {
    width: 32px;
    height: 32px;
}

/* Clause Selection */
.clause-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-group:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.08);
}

.checkbox-group input {
    display: none;
}

.checkbox-custom {
    min-width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-top: 3px;
    position: relative;
    transition: var(--transition);
}

.checkbox-group input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-group input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text strong {
    display: block;
    margin-bottom: 0.25rem;
}

.checkbox-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Wizard Footer */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #5b4bc4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.btn-secondary {
    background: var(--accent);
    color: white;
}

.btn-secondary:hover {
    background: #e86395;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--glass);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text);
    background: var(--glass);
}

.hidden {
    display: none !important;
}

/* Preview Section */
.preview-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.preview-box {
    max-height: 500px;
    overflow-y: auto;
    padding: 2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
}

.preview-box::-webkit-scrollbar {
    width: 8px;
}

.preview-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.preview-box::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.preview-box::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

.terms-content h1 { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--primary-light); }
.terms-content h2 { font-size: 1.25rem; margin-top: 1.5rem; margin-bottom: 1rem; color: var(--primary-light); }
.terms-content p { margin-bottom: 1rem; }
.terms-content ul { margin-bottom: 1rem; padding-left: 1.5rem; }

footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-content:not(.hidden) {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Responsive */
@media (max-width: 600px) {
    .app-container {
        padding: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .steps-progress {
        margin-bottom: 2rem;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .wizard-footer {
        flex-direction: column-reverse;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
