

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

:root {
  --primary-color: #121212;
  --bg-color: #ffffff;
  --text-color: #333;
  --accent: #f0f0f0;
}

* {
  box-sizing: border-box;
}

body {
  
  margin: 0;
  font-family: "Nunito", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
  user-select: none;
}

body.dark-theme {
  --bg-color: #121212;
  --text-color: #eee;
  --accent: #1f1f1f;
  --primary-color: #121212;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid #444444;
  transition: opacity 0.3s ease;
}

.logo {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.scramble-container {
  background-color: var(--accent);
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #444444;
  position: relative;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.scramble-text {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1.7rem;
  word-spacing: 0.3rem;
  line-height: 1.4;
  flex: 1;
}

.scramble-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.scramble-btn {
  background-color: #b32a36 !important;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
}

.scramble-btn:hover {
  opacity: 0.9;
}

.content-container {
  display: flex;
  flex: 1;
  position: relative;
  min-height: calc(100vh - 200px);
}

.sidebar {
  width: 300px;
  background-color: var(--accent);
  padding: 1rem;
  overflow-y: auto;
  position: relative;
  z-index: 50;
  flex-shrink: 0;
  border-right: 1px solid #444444;
}

.main-content {
  flex: 1;
  position: relative;
  min-height: 100%;
  transition: opacity 0.9s ease;
}

.timer-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  cursor: pointer;
  user-select: none;
  padding: 2rem;
  border-radius: 10px;
  transition: background-color 0.2s;
  z-index: 10;
  min-width: 300px;
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.timer-container:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.timer-container.preparing {
  background-color: rgba(0, 255, 0, 0.1);
}

.timer-container.timing {
  background-color: rgba(255, 165, 0, 0.1);
}

#timer {
  font-size: 8rem;
  margin: 1rem 0;
  font-weight: bold;
  width: 8.5ch;
  display: inline-block;
  text-align: center;
}

.help-text {
  font-size: 1rem;
  color: gray;
}

.timer-state {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

h2,
h3 {
  margin-top: 1.5rem;
}


.theme-options {
  display: none !important;
}

.theme-option {
  display: none !important;
}

.theme-option.active {
  display: none !important;
}

.theme-blue,
.theme-green,
.theme-red,
.theme-purple {
  display: none !important;
}

.custom-color-container {
  display: none !important;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  margin-right: 10px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 20px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.slider:before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.switch input:checked+.slider {
  background-color: #121212;
}

.switch input:checked+.slider:before {
  transform: translateX(20px);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 1rem;
}

.stat-item {
  background: var(--bg-color);
  padding: 0.5rem;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.history-list {
  margin-top: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  border-bottom: 1px solid #ddd;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.solve-number {
  font-weight: bold;
  min-width: 25px;
  color: var(--text-color);
}

.solve-time {
  flex: 1;
  text-align: center;
}

.solve-date {
  font-size: 0.8rem;
  color: #666;
  min-width: 60px;
}

.delete-btn {
  background: transparent;
  border: none;
  color: red;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  min-width: 20px;
}

.dark-theme .history-item {
  border-color: #444;
}

.dark-theme .scramble-container {
  border-color: #444;
}

.dark-theme .solve-date {
  color: #aaa;
}

.solve-menu-btn {
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0 5px;
  font-size: 1.2rem;
  opacity: 0.7;
}

.solve-menu-btn:hover {
  opacity: 1;
}

.solve-menu {
  position: absolute;
  background: var(--bg-color);
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0;
  min-width: 120px;
  z-index: 1000;
  display: none;
}

.dark-theme .solve-menu {
  border-color: #444;
}

.solve-menu-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.solve-menu-item:hover {
  background: var(--accent);
}

.solve-comment {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
  margin-top: 0.2rem;
}

.dark-theme .solve-comment {
  color: #aaa;
}

.dnf {
  text-decoration: line-through;
  opacity: 0.7;
}

.plus2::after {
  content: '+2';
  color: #dc3545;
  font-size: 0.8em;
  margin-left: 2px;
}

.settings-section {
  margin-bottom: 1rem;
}

.checkbox-option {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.checkbox-option input[type="checkbox"] {
  margin-right: 0.5rem;
}

.history-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.clear-btn {
  background-color: #b32a36;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.clear-btn:hover {
  opacity: 0.9;
}

.export-btn {
  background-color: #121212;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.export-btn:hover {
  opacity: 0.8;
}

.confirmation-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--bg-color);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 1rem;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.modal-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.confirm-btn {
  background-color: #dc3545;
  color: white;
}

.cancel-btn {
  background-color: #6c757d;
  color: white;
}

.event-box {
  min-width: 120px;
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.event-box label {
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: inherit;
}

.event-box select {
  padding: 0.3rem;
  border-radius: 4px;
  border: 1px solid #aaa;
  background: #fff;
  color: #333;
}

body.dark-theme .event-box {
  background: #121212;
  color: #fff;
  border-color: #444;
}

body.dark-theme .scramble-container {
  border-color: #444;
}

body.dark-theme .event-box select {
  background: #121212;
  color: #fff;
  border-color: #444;
}

/* Hide elements during timing */
body.timing-active {
  background-color: var(--bg-color);
}

body.timing-active header,
body.timing-active .scramble-container,
body.timing-active .sidebar,
body.timing-active .help-text,
body.timing-active .timer-state {
  opacity: 0;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
}

body.timing-active .timer-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: var(--bg-color);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

body.timing-active #timer {
  font-size: 12rem;
  margin: 0;
}

@media (max-width: 768px) {
  body.timing-active #timer {
    font-size: 8rem;
  }
}

@media (max-width: 480px) {
  body.timing-active #timer {
    font-size: 6rem;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .content-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    order: 2;
    max-height: 50vh;
    overflow-y: auto;
  }

  .main-content {
    order: 1;
    min-height: 50vh;
  }

  .timer-container {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 50vh;
    padding: 1rem;
    min-width: auto;
  }

  #timer {
    font-size: 4.5rem;
    margin: 0.5rem 0;
  }

  .help-text {
    font-size: 0.9rem;
    text-align: center;
  }

  .scramble-text {
    font-size: 1rem;
  }

  .scramble-controls {
    gap: 0.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .history-list {
    max-height: 150px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .logo {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  header {
    padding: 0.5rem;
  }

  .scramble-container {
    padding: 0.5rem;
  }

  .sidebar {
    padding: 0.5rem;
  }

  #timer {
    font-size: 3.5rem;
  }

  .timer-state {
    font-size: 1rem;
  }

  .help-text {
    font-size: 0.8rem;
  }

  .scramble-text {
    font-size: 0.9rem;
    word-spacing: 0.2rem;
  }

  .checkbox-option {
    font-size: 0.9rem;
  }

  .scramble-btn,
  .export-btn,
  .clear-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;

  }
}

#new-scramble {
  background-color: #dc3545;
}

/* Tablet Portrait */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 250px;
  }

  #timer {
    font-size: 6rem;
  }
}

/* Large Desktop */
@media (min-width: 1400px) {
  .sidebar {
    width: 350px;
  }

  #timer {
    font-size: 6rem;
  }

  .timer-container {
    min-width: 400px;
  }
}

.sidebar {
  animation-name: sidebar;
  animation-duration: 0.7s;
  animation-timing-function: ease-in-out;
}

@keyframes sidebar {
  from {
    transform: translateX(-500px);
    opacity: 0;
  }

  to {
    transform: translateX(0px);
    opacity: 100;
  }

}

.scramble-container {
  animation-name: upper;
  animation-duration: 0.7s;
  animation-timing-function: ease-in-out;
}

@keyframes upper {
  from {
    transform: translateY(-200px);
  }

  to {
    transform: translateY(0px);
  }
}

header {
  animation-name: upper;
  animation-duration: 0.7s;
  animation-timing-function: ease-in-out;
}

.timer-container {
  animation-duration: 0.9s;
  animation-name: uppe;
  animation-timing-function: ease-in-out;
}

@keyframes uppe {
  from {
    opacity: 0;
  }

  to {
    opacity: 100;
  }
}

.option:hover {
  background-color: #dc3545;
  color: #fff;
}

.history-item.best-solve .solve-time {
  color: #28a745;
  font-weight: bold;
}

.history-item.worst-solve .solve-time {
  color: #dc3545;
  font-weight: bold;
}

.dark-theme .history-item.best-solve .solve-time {
  color: #00ff00;
}

.dark-theme .history-item.worst-solve .solve-time {
  color: #ff4444;
}
.rome{
  background-color: #C93341;
}

#screenshot-btn {
  background-color: #b32a36 !important;
  color: white;
}
#screenshot-btn:hover {
  background-color: #b32a36 !important;
}
header{
  gap: 20vw;
}
.hide{
  border: 0;
  padding: 0.6rem  0.8rem;
  background-color: #b32a36 !important;
  border-radius: 4px;
}
.tutor{
  padding: 0.6rem  0.8rem;
  background-color: #b32a36 !important;
  border-radius: 4px;
  border: 0;
}
.tutor:hover{
opacity: 0.9;
}
.hide:hover{
  opacity: 0.9;
}
@media{
header{
  gap: 16vw;
}
}
.opacity{
  opacity: 0;
}
.sidebar{
  transition: opacity 0.3s ease;
}
.scramble-container{
  transition: opacity 0.3s ease;
}
.center{
  flex: 0.7;

}

@media (max-width: 400px) {
  .event-box,
  .scramble-controls button,
  .checkbox-option,
  .stat-item,
  .rome {
    width: 280px;
    max-width: 60vw;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .scramble-container {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .stat-item {
    flex: 0 0 auto;
    text-align: center;
  }

  .scramble-text {
    text-align: center;
    font-size: 0.95rem;
    padding: 0 0.5rem;
    word-wrap: break-word;
  }
  .scramble-controls,
  .stats-grid,
  .event-box,
  .checkbox-option,
  .rome {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}  
.history-list::-webkit-scrollbar{
  display: none;
}
  
