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

/* global */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --success: #10b981;
  --success-hover: #059669;
  --danger: #ef4444;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --card-bg: rgba(30, 41, 59, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #f59e0b;
  --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
  --font-family: 'Poppins', -apple-system, sans-serif;
}

body {
  background-image: url('pics/background.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: var(--font-family);
  color: var(--text-main);
  font-size: 1em;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.container {
  width: 95%;
  max-width: 440px;
  padding: 35px 30px;
  border-radius: 16px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-premium);
  margin: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-main);
  box-sizing: border-box;
}

.logo {
  width: 100px;
  height: auto;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2rem, 7vw, 2.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin-bottom: 24px;
}

label {
  font-size: 1.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.button {
  padding: 12px 24px;
  font-size: 1.1em;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.button:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #3730a3 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.35);
}

.button:active {
  transform: translateY(0);
}

.result {
  text-align: center;
  margin-top: 20px;
  font-weight: 600;
  color: var(--success);
}



/*sheetToJson.html*/
.footer-links {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-links a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #4CAF50;
  font-size: 1em;
  margin-bottom: 10px;
}

.footer-links img {
  margin-right: 8px;
  width: 24px;
  height: 24px;
}

input[type="text"] {
  width: 100%;
  max-width: 300px;
  padding: 10px;
  font-size: 1em;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* askQuestion.html*/
.button-container {
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.hide {
  display: none;
}

.incorrect-answers {
  margin-top: 20px;
  text-align: left;
}

.question {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 1.5em;
}

.options {
  margin-bottom: 20px;
}

.option {
  display: block;
  margin-bottom: 10px;
}

/* selectQuestion.html */

input[type="number"] {
  width: 100%;
  padding: 10px;
  font-size: 1.2em;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/*usage.html*/
.usage_body {
  font-family: 'Arial', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  box-sizing: border-box; /* Added to include padding in width calculations */
}

.usage_container {
  background-color: #fff;
  padding: 40px 55px; /* Reduced padding by 5px on the left and right */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 800px;
  margin: 20px auto;
  box-sizing: border-box; /* Added to include padding in width calculations */
  overflow-x: hidden; /* Prevent horizontal overflow */
}

@media (max-width: 768px) {
  .usage_container {
    padding: 40px 15px 40px 75px; /* Reduced padding by 5px on the left for smaller screens */
  }
}

.usage_h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #4CAF50;
  text-align: center;
}

h2 {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: #333;
}

p {
  font-size: 1.2em;
  margin-bottom: 20px;
}

ul {
  font-size: 1.2em;
  margin-bottom: 20px;
}

li {
  margin-bottom: 10px;
}

/* flashcard */
.flashcard {
  height: 250px;
  perspective: 1000px;
  cursor: pointer;
}

.flashcard .front, .flashcard .back {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 500;
  padding: 24px;
  box-sizing: border-box;
  border-radius: 12px;
  text-align: center;
  line-height: 1.5;
  overflow-y: auto;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.flashcard .front {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%); /* Deep Indigo-Navy */
  color: #ffffff; /* Crisp white for max contrast */
  border: 2px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  height: 250px;
}

.flashcard .front:hover {
  box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.flashcard .back {
  background: linear-gradient(135deg, #022c22 0%, #064e3b 100%); /* Deep Emerald-Teal */
  color: #ffffff; /* Crisp white for max contrast */
  border: 2px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  transform: rotateY(180deg);
}

.flashcard .back:hover {
  box-shadow: 0 15px 30px -5px rgba(16, 185, 129, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.flashcard.flipped .front {
  transform: rotateY(180deg);
}

.flashcard.flipped .back {
  transform: rotateY(0deg);
}

/* closs button*/
.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.2em;
}

.close-button:hover {
  background-color: #4CAF50;
}


/* scroll menu & accordion */
.scroll-menu {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 500px; /* Menünün maksimum yüksekliği */
  padding-right: 5px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.scroll-menu::-webkit-scrollbar {
  width: 6px;
}
.scroll-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}
.scroll-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
.scroll-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.scroll-menu button {
  margin: 5px 0;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  transition: all 0.2s ease;
}

.scroll-menu button:hover {
  background-color: var(--primary);
  border-color: var(--primary-hover);
  transform: translateX(4px);
}

.section-header {
  color: var(--accent);
  background-color: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  margin: 10px 0 5px 0;
  text-align: left;
  font-weight: 600;
  font-size: 1.1em;
  border-radius: 0 6px 6px 0;
}

.accordion-header {
  font-size: 1.15em;
  font-weight: 500;
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.accordion-header.active {
  background-color: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.accordion-header::after {
  content: '▼';
  font-size: 0.8em;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.accordion-header.active::after {
  transform: rotate(-180deg);
  color: var(--primary);
}

.accordion-content {
  padding: 12px;
  background-color: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.accordion-content button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  font-size: 0.95em;
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.accordion-content button:hover {
  background-color: var(--primary);
  border-color: var(--primary-hover);
  padding-left: 18px;
}


/* Learn with AI Styles */

.ai-container {
  max-height: 90vh;
  overflow-y: auto;
}

.api-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 5px;
}

.api-input-container {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.api-input-container input[type="text"] {
  margin-bottom: 0 !important;
  padding-right: 40px !important;
  width: 100%;
  box-sizing: border-box;
}

.api-status-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Icons */
.api-status-icon .tick {
  color: #4CAF50;
  font-weight: bold;
}

.api-status-icon .cross {
  color: #f44336;
  font-weight: bold;
}

.api-status-icon .spinner {
  border: 2px solid rgba(0, 0, 0, 0.1);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border-left-color: #007bff;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.api-error-message {
  color: #f44336;
  font-size: 0.85em;
  margin-top: 5px;
  margin-bottom: 15px;
  text-align: left;
  display: none;
  word-break: break-word;
}

/* Settings panel */
.ai-settings-toggle {
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  font-size: 0.9em;
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  text-decoration: underline;
  transition: color 0.2s;
}

.ai-settings-toggle:hover {
  color: #4CAF50;
}

.ai-settings-panel {
  display: none;
  background-color: #f7f5f5;
  padding: 12px;
  border-radius: 5px;
  margin-bottom: 15px;
  border: 1px solid #e2dddd;
}

.ai-settings-panel.show {
  display: block;
}

.setting-group {
  margin-bottom: 10px;
  text-align: left;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-group label {
  font-size: 0.9em;
  margin-bottom: 5px;
  color: #555;
  text-align: left;
}

.setting-group input, .setting-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9em;
  box-sizing: border-box;
}

/* Question panel */
.ai-question-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-top: 10px;
  margin-bottom: 15px;
  border-left: 5px solid #4CAF50;
  text-align: left;
}

.ai-question-title {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 8px;
}

.ai-question-text {
  font-size: 1.25em;
  font-weight: 500;
  color: #333;
  word-break: break-word;
}

/* Navigation buttons (English forward/backward arrows) */
.ai-nav-container {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}

.ai-nav-button {
  flex: 1;
  padding: 10px;
  font-size: 1em;
  border-radius: 5px;
  cursor: pointer;
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.ai-nav-button:hover:not(:disabled) {
  background-color: #ddd;
}

.ai-nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Answer inputs */
.ai-answer-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  font-size: 1em;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box;
  margin-bottom: 15px;
  font-family: inherit;
  resize: vertical;
}

.ai-answer-textarea:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.ai-submit-button {
  width: 100%;
  padding: 12px;
  font-size: 1.1em;
  color: #fff;
  background-color: #4CAF50;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.ai-submit-button:hover:not(:disabled) {
  background-color: #45a049;
}

.ai-submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Evaluation panel */
.ai-evaluation-container {
  margin-top: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border-left: 5px solid #007bff;
  padding: 15px;
  display: none;
  text-align: left;
}

.ai-evaluation-header {
  font-size: 0.9em;
  font-weight: bold;
  text-transform: uppercase;
  color: #007bff;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-evaluation-body {
  font-size: 1em;
  line-height: 1.5;
  color: #333;
  white-space: pre-wrap;
}

/* Loading animations */
.ai-loading-skeleton {
  display: none;
  margin-top: 20px;
  padding: 15px;
  background-color: #fff;
  border-radius: 8px;
  border-left: 5px solid #ffc107;
  text-align: left;
}

.ai-loading-header {
  height: 15px;
  width: 40%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-pulse 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

.ai-loading-line {
  height: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-pulse 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.ai-loading-line.short {
  width: 60%;
}

.ai-loading-line.medium {
  width: 80%;
}

@keyframes loading-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Language switch styles */
.lang-switch-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.lang-switch-btn {
  padding: 8px 16px;
  font-size: 0.9em;
  color: #333;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-switch-btn.active {
  background-color: #4CAF50;
  color: white;
  border-color: #4CAF50;
}

.lang-switch-btn:hover:not(.active) {
  background-color: #ddd;
}

.guide-step {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #eee;
  text-align: left;
}

.guide-step:last-child {
  border-bottom: none;
}

.guide-step strong {
  color: #4CAF50;
  font-size: 1.1em;
}

.guide-step a {
  color: #007BFF;
  text-decoration: none;
  font-weight: bold;
}

.guide-step a:hover {
  text-decoration: underline;
}