/*
Theme Name: Pierdetimpul - Matematică pentru Începători
Theme URI: https://pierdetimpul.ro
Author: Gabriel Tarasescu
Author URI: https://isusteiubeste.ro
Description: Temă interactivă cu probleme de matematică pentru începători
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: pierdetimpul
*/

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

.site-header {
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 20px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.main-nav ul { list-style: none; display: flex; gap: 20px; }
.main-nav a {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
}
.main-nav a:hover, .main-nav a.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.main-content { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }

.hero { text-align: center; padding: 60px 20px; color: white; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; text-shadow: 2px 2px 4px rgba(0,0,0,0.2); }
.hero p { font-size: 1.3rem; opacity: 0.9; max-width: 600px; margin: 0 auto 30px; }

.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  padding: 20px 0;
}

.category-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.category-card:hover { transform: translateY(-10px); }
.category-card .icon { font-size: 4rem; margin-bottom: 15px; }
.category-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.category-card p { color: #666; }

.category-card.addition { border-top: 5px solid #4CAF50; }
.category-card.addition .icon { color: #4CAF50; }
.category-card.subtraction { border-top: 5px solid #f44336; }
.category-card.subtraction .icon { color: #f44336; }
.category-card.multiplication { border-top: 5px solid #2196F3; }
.category-card.multiplication .icon { color: #2196F3; }
.category-card.division { border-top: 5px solid #FF9800; }
.category-card.division .icon { color: #FF9800; }
.category-card.mixed { border-top: 5px solid #9C27B0; }
.category-card.mixed .icon { color: #9C27B0; }

/* Carduri Gramatică */
.category-card.grammar.plural-card { border-top: 5px solid #00BCD4; }
.category-card.grammar.plural-card .icon { color: #00BCD4; }
.category-card.grammar.ortografie-card { border-top: 5px solid #E91E63; }
.category-card.grammar.ortografie-card .icon { color: #E91E63; }
.category-card.grammar.verbe-card { border-top: 5px solid #673AB7; }
.category-card.grammar.verbe-card .icon { color: #673AB7; }
.category-card.grammar.sz-card { border-top: 5px solid #009688; }
.category-card.grammar.sz-card .icon { color: #009688; }

/* Titlu secțiune */
.section-title {
  color: white;
  text-align: center;
  font-size: 1.5rem;
  margin: 30px 0 15px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

/* Stiluri exerciții gramatică */
.grammar-question {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.grammar-label {
  font-size: 1rem;
  color: #666;
}
.grammar-word {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
}
.grammar-sentence {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  line-height: 1.6;
}
.grammar-hint {
  font-size: 0.9rem;
  color: #888;
  font-style: italic;
}
.grammar-options {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 25px;
  flex-wrap: wrap;
}
.grammar-option {
  padding: 20px 50px;
  font-size: 1.6rem;
  font-weight: 600;
  border: 3px solid #ddd;
  border-radius: 15px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}
.grammar-option:hover {
  border-color: #667eea;
  background: #f0f4ff;
}
.grammar-option.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}
.grammar-option.correct-option {
  border-color: #4CAF50;
  background: #e8f5e9;
  color: #2e7d32;
}
.grammar-option.wrong-option {
  border-color: #f44336;
  background: #ffebee;
  color: #c62828;
}
.grammar-option:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.exercise-area {
  background: white;
  border-radius: 30px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  max-width: 700px;
  margin: 0 auto;
}

.exercise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #eee;
}
.exercise-header h2 { font-size: 1.8rem; }

.score-display {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 700;
}

.problem-display { text-align: center; padding: 40px 20px; }
.problem-text {
  font-size: 4rem;
  font-weight: 800;
  color: #333;
  margin-bottom: 30px;
  font-family: 'Courier New', monospace;
}

.answer-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.answer-input {
  font-size: 2.5rem;
  width: 150px;
  padding: 15px;
  text-align: center;
  border: 3px solid #ddd;
  border-radius: 15px;
  font-weight: 700;
}
.answer-input:focus { outline: none; border-color: #667eea; }
.answer-input.correct { border-color: #4CAF50; background: #e8f5e9; }
.answer-input.incorrect { border-color: #f44336; background: #ffebee; }

.check-btn, .next-btn {
  font-size: 1.2rem;
  padding: 15px 35px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease;
}
.check-btn:hover, .next-btn:hover { transform: scale(1.05); }
.next-btn { background: #4CAF50; margin-top: 20px; display: none; }
.next-btn.show { display: inline-block; }

.feedback {
  margin-top: 25px;
  padding: 20px;
  border-radius: 15px;
  font-size: 1.3rem;
  font-weight: 600;
  display: none;
}
.feedback.show { display: block; animation: fadeIn 0.3s ease; }
.feedback.correct { background: #e8f5e9; color: #2e7d32; }
.feedback.incorrect { background: #ffebee; color: #c62828; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.difficulty-selector { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; }
.difficulty-btn {
  padding: 10px 25px;
  border: 2px solid #ddd;
  background: white;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}
.difficulty-btn:hover, .difficulty-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
}

.progress-container { margin-top: 30px; padding-top: 20px; border-top: 2px solid #eee; }
.progress-bar { height: 12px; background: #eee; border-radius: 10px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 10px;
  transition: width 0.5s ease;
}
.progress-text { text-align: center; margin-top: 10px; color: #666; font-weight: 600; }

.session-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 25px; }
.stat-item { text-align: center; padding: 15px; background: #f8f9fa; border-radius: 15px; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: #667eea; }
.stat-label { font-size: 0.85rem; color: #666; margin-top: 5px; }

.site-footer { text-align: center; padding: 30px; color: rgba(255,255,255,0.8); margin-top: 50px; }

@media (max-width: 768px) {
  .hero { padding: 8px 10px; }
  .hero h1 { font-size: 1.2rem; margin-bottom: 0; }
  .hero p { display: none; }
  
  .category-cards { 
    gap: 8px; 
    padding: 5px 0; 
    grid-template-columns: repeat(2, 1fr);
  }
  .category-card { 
    padding: 12px 8px; 
    border-radius: 10px;
    min-height: auto;
  }
  .category-card .icon { font-size: 1.5rem; margin-bottom: 4px; }
  .category-card h3 { font-size: 0.85rem; margin-bottom: 0; }
  .category-card p { display: none; }
  
  .main-content { padding: 10px 8px; }
  .exercise-area { padding: 15px 12px; border-radius: 15px; }
  .exercise-header { margin-bottom: 10px; padding-bottom: 8px; }
  .exercise-header h2 { font-size: 1.1rem; }
  .score-display { padding: 4px 12px; font-size: 0.7rem; }
  
  .problem-display { padding: 15px 8px; }
  .problem-text { font-size: 1.8rem; margin-bottom: 15px; }
  .answer-input { font-size: 1.3rem; width: 80px; padding: 8px; }
  .check-btn, .next-btn { font-size: 0.8rem; padding: 10px 20px; }
  
  .difficulty-selector { gap: 5px; margin-bottom: 10px; flex-wrap: wrap; }
  .difficulty-btn { padding: 6px 10px; font-size: 0.6rem; }
  
  .progress-container { margin-top: 10px; padding-top: 10px; }
  .session-stats { grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
  .stat-item { padding: 8px 4px; }
  .stat-value { font-size: 1rem; }
  .stat-label { font-size: 0.55rem; }
  
  .site-header { padding: 6px 8px; }
  .site-header .container { flex-direction: column; gap: 5px; }
  .site-title { font-size: 1.1rem; }
  .main-nav ul { gap: 4px; flex-wrap: wrap; justify-content: center; }
  .main-nav a { padding: 4px 6px; font-size: 0.9rem; }
  
  .site-footer { padding: 15px; margin-top: 20px; font-size: 0.65rem; }
  
  .section-title { font-size: 1rem; margin: 15px 0 10px; }
  
  /* Gramatică mobil */
  .grammar-word { font-size: 1.8rem; }
  .grammar-sentence { font-size: 1.1rem; }
  .grammar-options { 
    flex-direction: column; 
    align-items: center;
    gap: 20px; 
    margin-top: 20px; 
  }
  .grammar-option { 
    padding: 18px 50px; 
    font-size: 1.4rem; 
    min-width: 120px;
    width: 70%;
    max-width: 220px;
    text-align: center;
  }
}

.why-section { padding-top: 30px; }
.why-section h2 { font-size: 1.8rem; margin-bottom: 15px; }
.why-section p { font-size: 1rem; }

@media (max-width: 768px) {
  .why-section { display: none; }
}

@media (max-width: 480px) {
  .hero { padding: 6px 6px; }
  .hero h1 { font-size: 1rem; }
  
  .category-cards { grid-template-columns: 1fr 1fr; gap: 6px; }
  .category-card { padding: 10px 6px; }
  .category-card .icon { font-size: 1.3rem; margin-bottom: 3px; }
  .category-card h3 { font-size: 0.75rem; }
  
  .problem-text { font-size: 1.5rem; }
  .answer-input { font-size: 1.1rem; width: 70px; }
  .answer-section { gap: 10px; }
  
  .main-nav ul { gap: 3px; }
  .main-nav a { padding: 4px 5px; font-size: 0.85rem; }
  
  .grammar-word { font-size: 1.5rem; }
  .grammar-sentence { font-size: 1rem; }
  .grammar-options { 
    flex-direction: column; 
    align-items: center;
    gap: 20px; 
    margin-top: 15px; 
  }
  .grammar-option { 
    padding: 18px 50px; 
    font-size: 1.4rem; 
    min-width: 120px;
    width: 80%;
    max-width: 200px;
  }
}

body.admin-bar .site-header { top: 32px; }
