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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  margin-bottom: 10px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#mainMenu {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.menu-card {
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 25px 40px;
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.menu-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.primary-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.primary-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8f 100%);
}

.secondary-btn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.secondary-btn:hover {
  background: linear-gradient(135deg, #e081e8 0%, #e4465a 100%);
}

.btn-icon {
  font-size: 2rem;
}

.btn-text {
  font-size: 1.2rem;
}

.back-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  margin-bottom: 20px;
  transition: background 0.3s;
}

.back-btn:hover {
  background: #5a6268;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#fileUploadView, #tahkimView {
  display: none;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.card h2 {
  margin-bottom: 15px;
  color: #333;
}

.info-text {
  color: #666;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* File input styling */
.file-input-wrapper {
  margin-bottom: 20px;
}

#imageInput {
  display: none;
}

.file-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.file-button {
  background: #667eea;
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1rem;
  transition: background 0.3s;
  display: inline-block;
}

.file-button:hover {
  background: #5568d3;
}

.file-count {
  color: #666;
  font-size: 0.9rem;
}

/* Image preview */
.image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
  min-height: 100px;
}

.preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.file-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 150px;
  padding: 10px;
  background: #f8f9fa;
}

.file-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 8px;
}

.file-name {
  font-size: 0.75rem;
  color: #666;
  text-align: center;
  word-break: break-word;
  max-width: 100%;
}

.remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.remove-btn:hover {
  background: rgba(255, 0, 0, 1);
}

/* Buttons */
.submit-btn, .reset-btn {
  width: 100%;
  background: #667eea;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: background 0.3s;
}

.submit-btn:hover:not(:disabled) {
  background: #5568d3;
}

.submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.reset-btn, .generate-doc-btn, .add-to-excel-btn {
  flex: 1;
  width: 100%;
  background: #28a745;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: background 0.3s;
}

.reset-btn:hover, .generate-doc-btn:hover, .add-to-excel-btn:hover {
  background: #218838;
}

.generate-doc-btn:disabled, .add-to-excel-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.generate-doc-btn:disabled:hover, .add-to-excel-btn:disabled:hover {
  background: #ccc;
}

.document-card {
  margin-top: 20px;
  padding: 20px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  text-align: center;
}

.document-card p {
  margin-bottom: 15px;
  color: #155724;
  font-weight: 600;
}

.download-btn {
  display: inline-block;
  background: #28a745;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.download-btn:hover {
  background: #218838;
}

/* Summary result */
.summary-result {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  line-height: 1.6;
  color: #333;
  max-height: 600px;
  overflow-y: auto;
}

.data-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.info-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section-title {
  font-size: 1.3rem;
  color: #667eea;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-label {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
}

.info-value {
  color: #333;
  font-size: 1rem;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #667eea;
}

.editable-field {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #667eea;
  border-radius: 4px;
  font-size: 1rem;
  color: #333;
  background: white;
  transition: border-color 0.3s;
}

.editable-field:focus {
  outline: none;
  border-color: #5568d3;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nested-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.nested-title {
  font-size: 1.1rem;
  color: #555;
  margin: 0 0 12px 0;
  font-weight: 600;
}

.no-data {
  color: #999;
  font-style: italic;
  padding: 20px;
  text-align: center;
}

/* Loading */
.loading-card {
  text-align: center;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  border-left: 4px solid #dc3545;
}

/* Form styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

.form-select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #667eea;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s;
}

.form-select:focus {
  outline: none;
  border-color: #5568d3;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select:disabled {
  background: #f8f9fa;
  cursor: not-allowed;
  border-color: #ccc;
}

/* Tahkim butonları */
.tahkim-buttons-container {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 2px solid #e0e0e0;
}

.buttons-title {
  font-size: 1.3rem;
  color: #667eea;
  margin-bottom: 20px;
  text-align: center;
}

.tahkim-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tahkim-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 180px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tahkim-action-btn:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  border-color: #667eea;
}

.tahkim-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f9fa;
}

.btn-icon-large {
  font-size: 3rem;
  margin-bottom: 15px;
}

.btn-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  text-align: center;
}

.btn-description {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  line-height: 1.4;
}

/* Her buton için özel renkler */
.sigorta-btn:hover:not(:disabled) {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.tahkim-dilekce-btn:hover:not(:disabled) {
  border-color: #f5576c;
  background: linear-gradient(135deg, rgba(245, 87, 108, 0.05) 0%, rgba(240, 147, 251, 0.05) 100%);
}

.tahkim-form-btn:hover:not(:disabled) {
  border-color: #28a745;
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.05) 100%);
}

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

.modal[style*="display: flex"] {
  display: flex !important;
}

.modal-content {
  background-color: white;
  margin: auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s;
}

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

.modal-header {
  padding: 20px 25px;
  border-bottom: 2px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #667eea;
  font-size: 1.3rem;
}

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

.modal-close:hover {
  color: #000;
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 2px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #667eea;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  background: white;
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #5568d3;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: #5568d3;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-secondary:hover {
  background: #5a6268;
}

