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

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e3a8a;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.header {
    background: #84cc16;
    color: white;
    text-align: center;
    padding: 30px;
    font-size: 2em;
    font-weight: 700;
    position: relative;
}

.back-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.main-content {
    display: flex;
    min-height: calc(100vh - 140px);
}

.controls {
    width: 380px;
    background: #f8f9fa;
    padding: 25px;
    overflow-y: auto;
    overflow-x: hidden;
    border-left: 3px solid #84cc16;
}

.preview {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.control-group {
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.control-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #84cc16;
}

.control-group h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.15em;
    font-weight: 700;
    border-bottom: 3px solid #84cc16;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

label {
    font-weight: 600;
    color: #2c3e50;
    min-width: 100px;
    font-size: 0.9em;
    text-align: right;
    flex-shrink: 0;
}

.control-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.value-display {
    display: inline-block;
    background: #f7fee7;
    border: 2px solid #84cc16;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85em;
    color: #84cc16;
    font-weight: 700;
    min-width: 55px;
    max-width: 70px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(132, 204, 22, 0.1);
    box-sizing: border-box;
}

select, input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-family: 'Cairo', sans-serif;
    background: white;
}

select:focus, input[type="text"]:focus {
    outline: none;
    border-color: #84cc16;
    box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.1);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 6px;
    background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%);
    border-radius: 3px;
    border: none;
    padding: 0;
    outline: none;
    min-width: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #84cc16;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(132, 204, 22, 0.4);
    border: 3px solid white;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #84cc16;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(132, 204, 22, 0.4);
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: linear-gradient(to right, #84cc16 0%, #e5e7eb 0%);
    border-radius: 3px;
}

.list-preview {
    background: white;
    border: 3px dashed #84cc16;
    border-radius: 15px;
    padding: 40px;
    margin: 20px 0;
    min-height: 300px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.preview-list {
    list-style: disc;
    padding-right: 30px;
    margin: 0;
    font-size: 16px;
    color: #374151;
    line-height: 2;
}

.preview-list li {
    margin-bottom: 5px;
}

.preview-list ul {
    margin-top: 5px;
    padding-right: 20px;
}

.code-display {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 15px;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    margin-top: 20px;
    overflow-x: auto;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
    white-space: pre-wrap;
    direction: ltr;
    text-align: left;
}

.buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #2563eb;
}

.reset-button {
    background: #ef4444;
}

.reset-button:hover {
    background: #dc2626;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.preset-button {
    padding: 8px 12px;
    font-size: 0.8em;
    border-radius: 15px;
    background: #f59e0b;
}

.preset-button:hover {
    background: #d97706;
}

input[type="checkbox"] {
    margin-left: 8px;
    transform: scale(1.2);
    accent-color: #84cc16;
}

input[type="color"] {
    width: 40px;
    height: 32px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}