@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@400;500;600;700&display=swap');

* {
  font-family: 'League Spartan', sans-serif;
}

.input-with-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.format-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  padding: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.format-btn {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'League Spartan', sans-serif;
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
}

.format-btn:hover {
  background: #00247D;
  color: white;
  border-color: #00247D;
}

.format-btn:active {
  background: #001a5e;
  transform: translateY(1px);
}

.label-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.label-inputs input {
  width: 100%;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

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

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 20px auto;
  padding: 0;
  width: 90%;
  max-width: 900x;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  background-color: #00247D;
  color: white;
  padding: 15px 20px;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.close {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.settings-row {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-section {
  flex: 1;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.settings-section.full-width {
  width: 100%;
}

.settings-section h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
}

.axis-range-inputs,
.padding-inputs,
.grid-inputs,
.tick-inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 15px;
}

.axis-labels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.axis-input-group,
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.range-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-input input {
  width: calc(50% - 15px);
}

input[type="number"],
input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'League Spartan', sans-serif;
  transition: border-color 0.2s;
}

input[type="number"]:focus,
input[type="text"]:focus {
  border-color: #00247D;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 36, 125, 0.1);
}

.help-text {
  font-size: 0.9rem;
  color: #666;
  margin: 10px 0;
  line-height: 1.4;
}

.info-button {
  background-color: transparent;
  border: none;
  color: #00247D;
  font-size: 0.9rem;
  font-family: 'League Spartan', sans-serif;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.info-button:hover {
  color: #001a5e;
}

.modal-footer {
  padding: 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #e5e5e5;
  border-radius: 0 0 8px 8px;
  text-align: right;
}

.update-graph-btn {
  background-color: #00247D;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-family: 'League Spartan', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.update-graph-btn:hover {
  background-color: #001a5e;
}
/* Container styles */
.graph-container {
    width: 900px;
    margin: 20px auto;
    position: relative;
}

/* JSXGraph board styles */
.jxgbox {
    width: 100%;
    height: 500px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    background-color: white;
}

/* Toolbar styles */
#toolbar {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    margin-bottom: 10px;
}

.tool-group {
    display: flex;
    gap: 5px;
    padding: 0 10px;
    border-right: 1px solid #ccc;
}

.tool-group:last-child {
    border-right: none;
}

.tool-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color:black;
}

.tool-btn:hover {
    background: #e0e0e0;
}

.tool-btn.active {
    background: #004aad;
    color: white;
    border-color: #003c8f;
}

.tool-btn i {
    font-size: 18px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    border-radius: 8px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* New label modal styles */
.modal--az14W {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box--lfLmQ {
    background: white;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    margin: auto;
    overflow: auto;
}

.modal-header--tteDb {
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
}

.modal-content--wi6Ys {
    padding: 20px;
}

.modal-footer--XDOoP {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.advanced-input--6IXUq {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.buttons--1nSZW {
    display: flex;
    gap: 10px;
}

.button--xy48y {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color:black;
}

.button--xy48y:hover {
    background: #f5f5f5;
}

.button--cIAFQ {
    font-size: 14px;
}

.icon--UxzGs {
    width: 16px;
    height: 16px;
}

.input-box--GI6sZ {
    margin: 10px 0;
}

.textarea--brh8i {
    width: 90%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

.preview-title--HQRAp {
    font-weight: bold;
    margin: 10px 0;
}

.preview-box--kIsGp {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 50px;
    background: #f9f9f9;
}

.skin--AXoR1 {
    display: flex;
    align-items: center;
    gap: 5px;
}

.noselect--MIZyH {
    user-select: none;
}

.label--kSnK2 {
    font-size: 14px;
}

.icon-left--sG75Q {
    display: flex;
    align-items: center;
}

/* Settings panel styles */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-item {
    margin-bottom: 15px;
}

.axis-inputs, 
.grid-inputs, 
.label-inputs {
    display: grid;
    gap: 10px;
    margin-top: 5px;
}

.range-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.range-input input {
    width: 80px;
}

input[type="number"], 
input[type="text"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Submit button styles */
.submit-btn {
    background: #004aad;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    margin-top: 15px;
}

.submit-btn:hover {
    background: #003c8f;
}

/* Grid divisions input styles */
.grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.grid-inputs input {
    width: 100%;
}

/* Label input styles */
.label-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.label-inputs input {
    width: 100%;
}

/* Responsive styles */
@media (max-width: 960px) {
    .graph-container {
        width: 95%;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

.label-input {
    position: absolute;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
}

.graph-label {
    cursor: move;
    user-select: none;
}

.graph-label:hover {
    opacity: 0.8;
}

.graph-label-highlight {
    color: #0000ff;
}

.y-axis-label {
    transform: rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
    display: inline-block;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    overflow: hidden;
  }

  .modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 2% auto;
    width: 90%;
    max-width: 900px;
    max-height: 96vh;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .modal-header h3 {
    margin: 0;
    color: #333;
  }

  .close {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
  }

  .close:hover {
    color: #333;
  }

  .settings-group {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(96vh - 140px);
  }

  .setting-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
  }

  .setting-item:last-child {
    border-bottom: none;
  }

  .setting-item label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
  }

  .grid-inputs, .axis-inputs, .label-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }

  .grid-inputs input,
  .axis-inputs input,
  .label-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
  }

  .range-input {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .range-input input {
    width: calc(50% - 15px);
  }

  .modal-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    position: sticky;
    bottom: 0;
    z-index: 1;
  }

  .submit-btn {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
  }

  .submit-btn:hover {
    background-color: #0056b3;
  }

  @media (max-width: 768px) {
    .modal-content {
      margin: 0;
      width: 100%;
      height: 100%;
      max-height: 100vh;
      border-radius: 0;
    }

    .settings-group {
      max-height: calc(100vh - 140px);
    }
  }
