﻿:root {
  --primary-dark: #1a1a2e;
  --primary-blue: #0f3460;
  --accent-gold: #0040ff;
  --accent-rose: #e94560;
  --bg-light: #f8f7f4;
  --text-dark: #2a2a2a;
  --text-light: #666;
  --border-subtle: #e0ddd8;
}

.subtitle { font-size: 1.1rem; color: var(--text-light); font-weight: 300; }

.main-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
  align-items: start;
}
.controls-panel {
  background: white; border-radius: 16px; padding: 1rem;
  /*height: fit-content;*/
  overflow-y: auto; border:1px solid var(--border-subtle);
}

.preview-panel {
  background: white; border-radius: 16px; padding: 1rem;
  display: flex; flex-direction: column; gap: 2rem;
  min-width: 0;border:1px solid var(--border-subtle);
  position:sticky; top:3rem;
}
.control-section {
  margin-bottom: 1rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.control-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.section-title {
  font-family: 'Playfair Display', serif; font-size: 1.2rem;
  font-weight: 600; color: var(--primary-blue);
  margin-bottom: .5rem; display: flex; align-items: center; gap: 0.5rem;
}
.control-group { margin-bottom: 1.1rem; }
.main-grid label { display: block; font-size: 0.88rem; font-weight: 500; color: var(--text-dark); margin-bottom: 0.4rem; }

.main-grid input[type="text"], .main-grid input[type="number"], .main-grid select {
  width: 100%; padding: 0.65rem 0.8rem;
  border: 2px solid var(--border-subtle); border-radius: 8px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 0.92rem;
  transition: all 0.2s; background: white;
}
.main-grid input[type="text"]:focus, input[type="number"]:focus, .main-grid select:focus {
  outline: none; border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}
.main-grid input[type="color"] {
  width: 100%; height: 42px; border: 2px solid var(--border-subtle);
  border-radius: 3px; cursor: pointer; transition: border-color 0.2s; padding: 2px;
}
.main-grid input[type="color"]:hover { border-color: var(--accent-gold); }
.main-grid input[type="range"] {
  width: 100%; height: 5px; border-radius: 3px;
  background: var(--border-subtle); outline: none;
  -webkit-appearance: none; appearance: none;
}
.main-grid input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px;
  border-radius: 50%; background: var(--accent-gold); cursor: pointer; transition: all 0.2s;
}
.main-grid input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.25); background: var(--accent-rose); }
.main-grid input[type="range"]::-moz-range-thumb {
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent-gold); cursor: pointer; border: none;
}
.main-grid input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent-gold); }
.checkbox-group { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.checkbox-group label { margin-bottom: 0; cursor: pointer; font-size: 0.92rem; }
.range-value {
  display: inline-block;
  font-weight: 600; color: var(--accent-rose); font-size: 0.88rem;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

.shadow-sub {
  background: #faf9f7; border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 1rem; margin-top: 0.4rem;
  display: none;
}
.shadow-sub.visible { display: block; }

.preview-area {
  background: linear-gradient(135deg, #efefef 0%, #e4e4e4 100%);
  border-radius: 12px; padding: 4rem 2rem;
  display: flex; justify-content: center; align-items: center;
  min-height: 280px; position: relative; overflow: hidden;
}
.preview-area::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg,transparent,transparent 10px,rgba(0,0,0,0.018) 10px,rgba(0,0,0,0.018) 20px);
  pointer-events: none;
}
#previewButton { position: relative; z-index: 1; cursor: pointer; }

.preset-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; margin-top: 0.5rem; }
.preset-btn {
  padding: 0.7rem 0.5rem; border: 2px solid var(--border-subtle);
  border-radius: 10px; background: white; cursor: pointer;
  transition: all 0.2s; font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500; font-size: 0.85rem; text-align: center; line-height: 1.3;
}
.preset-btn:hover {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, #fdf6e3, #fef9ed);
  transform: translateY(-2px);
}
.preset-btn .preset-name { font-weight: 600; display: block; }
.preset-btn .preset-desc { font-size: 0.76rem; color: var(--text-light); display: block; margin-top: 1px; }
.random-btn {
  width: 100%; margin-top: 0.7rem; padding: 0.85rem;
  border: 2px dashed var(--accent-gold); border-radius: 10px;
  background: linear-gradient(135deg, #fdf6e3, #fef9ed);
  cursor: pointer; transition: all 0.2s;
  font-family: 'IBM Plex Sans', sans-serif; font-weight: 600;
  font-size: 0.9rem; color: var(--primary-blue);
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.random-btn:hover {
  background: var(--accent-gold); color: white; border-style: solid;
  transform: translateY(-2px);
}

.gradient-stop { display: flex; gap: 0.6rem; align-items: center; }
.gradient-stop input[type="color"] { width: 56px; height: 38px; flex-shrink: 0; }

@keyframes fadeIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }

.menu-btn { display: none; }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 998;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.sidebar-close {
  position: absolute;
  top: 0px;
  right: 0px;
  padding: 4px 5px;
  border-radius: 4px;
  border: none;
  background: #d90036;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: none;

}

.sidebar-close:hover {
  background: #000;
}

.sidebar-close:hover {
  opacity: 1;
}

@media (max-width: 850px) {
  .main-grid { grid-template-columns: 1fr; }
  
	.sidebar-close {
		display: block;
	}
	.menu-btn {
		display: block;  z-index: 8;
		background: #4d4cff; color: white; border: none; padding: 1px 15px;
		border-radius: 6px; cursor: pointer;
		font-size:0.85em;
	}

	.controls-panel {
		position: fixed; top: 0; left: -320px;
		width: 320px; height: 100vh; z-index: 999; background:white;padding:10px;
		transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		box-shadow: 10px 0 20px rgba(0,0,0,0.1);
	}

	.controls-panel.open {
		transform: translateX(320px);
	}	  
  
}