/* === Общие стили === */
* { box-sizing: border-box; margin:0; padding:0; font-family:'Inter', sans-serif; }
body {
  background: linear-gradient(135deg,#0f2027,#203a43,#2c5364);
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.container {
  max-width: 1200px;
  width: 100%;
}

/* Заголовок */
h1 {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
  background: linear-gradient(90deg, #ff8c00,#ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* === Блок с загрузкой === */
.box {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  margin-bottom: 30px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #ffd700;
}

input[type=file] {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #444;
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
}
input[type=file]:hover { background: rgba(255,255,255,0.2); }

/* Drag&Drop */
.dropzone {
  margin-top: 15px;
  padding: 30px;
  border: 2px dashed #ffd700;
  border-radius: 20px;
  text-align: center;
  font-weight: 500;
  color: #ffd700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.dropzone.dragover { background: rgba(255, 215, 0, 0.2); transform: scale(1.02); }

.info {
  margin-top: 12px;
  color: #ccc;
  font-size: 14px;
  text-align: center;
}

.errors { color: #ff6b6b; margin-top: 10px; font-weight: 500; text-align: center; }
.small { font-size: 13px; color: #aaa; text-align: center; margin-top: 5px; }

/* 3D Viewer */
#viewer {
  width: 100%;
  height: 1200px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  background: #111;
}

/* Кнопки */
button {
  display: block;
  margin: 20px auto 0;
  padding: 12px 25px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg,#ff8c00,#ffd700);
  color: #111;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
button:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

/* Адаптив */
@media(max-width:768px){
  #viewer { height: 600px; }
  h1 { font-size: 1.8rem; }
  .container {
    max-width: 900px;
    width: 100%;
}
}
.viewer-container {
  position: relative;
}

#fullscreenBtn {
    position: fixed;
    bottom: 10px;
    left: 50%;
    margin-left: -64px;
    z-index: 10;
    background: linear-gradient(90deg, #ff8c00, #ffd700);
    color: #111;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
#fullscreenBtn:hover { transform: translateY(-2px); }

#viewer.fullscreen {
  position: fixed !important;
  top: 0; left: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: all 0.3s ease-in-out;
}