/* Material Design Styles for Random Letter Generator */

:root {
  --primary-color: #6200ee;
  --primary-dark: #3700b3;
  --primary-light: #bb86fc;
  --secondary-color: #03dac6;
  --secondary-dark: #018786;
  --secondary-light: #64ffda;
  --background-color: #ffffff;
  --surface-color: #ffffff;
  --error-color: #b00020;
  --on-primary: #ffffff;
  --on-secondary: #000000;
  --on-background: #000000;
  --on-surface: #000000;
  --text-primary: rgba(0, 0, 0, 0.87);
  --text-secondary: rgba(0, 0, 0, 0.6);
  --text-disabled: rgba(0, 0, 0, 0.38);
  --divider-color: rgba(0, 0, 0, 0.12);
  --shadow-elevation-1: 0 2px 1px -1px rgba(0,0,0,0.2), 0 1px 1px 0 rgba(0,0,0,0.14), 0 1px 3px 0 rgba(0,0,0,0.12);
  --shadow-elevation-2: 0 3px 1px -2px rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12);
  --shadow-elevation-3: 0 3px 3px -2px rgba(0,0,0,0.2), 0 3px 4px 0 rgba(0,0,0,0.14), 0 1px 8px 0 rgba(0,0,0,0.12);
  --border-radius: 4px;
}

[data-theme="dark"] {
  --primary-color: #bb86fc;
  --primary-dark: #3700b3;
  --primary-light: #6200ee;
  --secondary-color: #03dac6;
  --secondary-dark: #018786;
  --secondary-light: #64ffda;
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --on-primary: #000000;
  --on-secondary: #000000;
  --on-background: #ffffff;
  --on-surface: #ffffff;
  --text-primary: rgba(255, 255, 255, 0.87);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-disabled: rgba(255, 255, 255, 0.38);
  --divider-color: rgba(255, 255, 255, 0.12);
  --shadow-elevation-1: 0 2px 1px -1px rgba(0,0,0,0.3), 0 1px 1px 0 rgba(0,0,0,0.14), 0 1px 3px 0 rgba(0,0,0,0.12);
  --shadow-elevation-2: 0 3px 1px -2px rgba(0,0,0,0.3), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12);
  --shadow-elevation-3: 0 3px 3px -2px rgba(0,0,0,0.3), 0 3px 4px 0 rgba(0,0,0,0.14), 0 1px 8px 0 rgba(0,0,0,0.12);
}

[data-theme="blue"] {
  --primary-color: #2196f3;
  --primary-dark: #0d47a1;
  --primary-light: #bbdefb;
  --secondary-color: #ff9800;
  --secondary-dark: #e65100;
  --secondary-light: #ffc947;
  --background-color: #e3f2fd;
  --surface-color: #ffffff;
  --on-primary: #ffffff;
  --on-secondary: #000000;
  --on-background: #000000;
  --on-surface: #000000;
  --text-primary: rgba(0, 0, 0, 0.87);
  --text-secondary: rgba(0, 0, 0, 0.6);
  --text-disabled: rgba(0, 0, 0, 0.38);
  --divider-color: rgba(0, 0, 0, 0.12);
  --shadow-elevation-1: 0 2px 1px -1px rgba(0,0,0,0.2), 0 1px 1px 0 rgba(0,0,0,0.14), 0 1px 3px 0 rgba(0,0,0,0.12);
  --shadow-elevation-2: 0 3px 1px -2px rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12);
  --shadow-elevation-3: 0 3px 3px -2px rgba(0,0,0,0.2), 0 3px 4px 0 rgba(0,0,0,0.14), 0 1px 8px 0 rgba(0,0,0,0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--background-color);
  color: var(--on-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}


.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.display-area {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-elevation-2);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.character-display {
  font-size: 100px;
  font-weight: 500;
  color: var(--primary-color);
  transition: color 0.3s;
}

.settings-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--on-surface);
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.3s;
  z-index: 1;
}

.settings-btn:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.material-button {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.0892857143em;
  padding: 10px 24px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 64px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.raised-button {
  background-color: var(--primary-color);
  color: var(--on-primary);
  box-shadow: var(--shadow-elevation-1);
}

.raised-button:hover {
  box-shadow: var(--shadow-elevation-2);
}

.raised-button:active {
  box-shadow: var(--shadow-elevation-3);
}

.outlined-button {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--divider-color);
}

.outlined-button:hover {
  background-color: rgba(98, 0, 238, 0.04);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: var(--surface-color);
  margin: 5% auto;
  padding: 0;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-elevation-3);
  animation: slideIn 0.3s;
  overflow: hidden;
  transition: all 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--divider-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--on-surface);
}

.close-btn {
  cursor: pointer;
  font-size: 24px;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.theme-selector, .character-set {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-selector label, .character-set label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.theme-select, .character-set-input {
  padding: 12px;
  border: 1px solid var(--divider-color);
  border-radius: var(--border-radius);
  background-color: var(--background-color);
  color: var(--on-background);
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  transition: border-color 0.3s;
}

.theme-select:focus, .character-set-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--divider-color);
}

/* Responsive design */
@media (max-width: 600px) {
  .container {
    padding: 10px;
  }
  
  .display-area {
    width: 150px;
    height: 150px;
  }
  
  .character-display {
    font-size: 80px;
  }
  
  .modal-content {
    margin: 10% auto;
  }
  
  .actions {
    flex-direction: column;
  }
  
  .material-button {
    width: 100%;
  }
}