:root {
    --primary-color: #6c63ff;
    --secondary-color: #4a44c9;
    --dark-color: #1a1a2e;
    --light-color: #f5f5f7;
    --success-color: #4caf50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--light-color);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.preview-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-container {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.background-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.glass-element {
    position: relative;
    z-index: 2;
    width: 80%;
    height: 60%;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.glass-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.glass-content {
    font-size: 1rem;
    opacity: 0.9;
}

.controls-section {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-group {
    margin-bottom: 25px;
}

.control-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-title i {
    color: var(--primary-color);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.slider-container label {
    min-width: 120px;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.value-display {
    min-width: 50px;
    text-align: right;
}

.color-picker-container {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.presets-section {
    width: 100%;
    margin-top: 20px;
}

.presets-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.preset {
    height: 80px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.preset:hover {
    transform: translateY(-5px);
}

.code-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.code-title {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: var(--secondary-color);
}

.code-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    white-space: pre;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .preview-container {
        height: 300px;
    }
}