/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header Styles */
header {
  text-align: center;
  margin-bottom: 40px;
  color: white;
  position: relative;
}

.back-button {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-5px);
}

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

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

/* GPT 상태 표시 */
.gpt-status {
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
  transition: all 0.3s ease;
}

.gpt-enabled {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.gpt-disabled {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Main Calculator Section */
.calculator-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

/* Input Section */
.input-section h2 {
  color: #4a5568;
  margin-bottom: 30px;
  font-size: 1.8rem;
  border-bottom: 3px solid #667eea;
  padding-bottom: 10px;
}

.input-group {
  margin-bottom: 25px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #4a5568;
  font-size: 1.1rem;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8fafc;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
  margin-top: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-right: 10px;
  transform: scale(1.2);
}

/* Result Section */
.result-section h2 {
  color: #4a5568;
  margin-bottom: 30px;
  font-size: 1.8rem;
  border-bottom: 3px solid #667eea;
  padding-bottom: 10px;
}

.take-home-section {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: 0 10px 25px rgba(72, 187, 120, 0.3);
}

.take-home-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

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

.take-home-item span:first-child {
  font-size: 1.1rem;
  font-weight: 500;
}

.take-home-item span:last-child {
  font-size: 1.3rem;
  font-weight: bold;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.take-home-item.main-result {
  background: rgba(255, 255, 255, 0.1);
  margin: -15px -30px 15px -30px;
  padding: 20px 30px;
  border-radius: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.take-home-item.main-result span:last-child {
  font-size: 1.8rem;
}

/* Tax Section */
.tax-section {
  background: #f8fafc;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 25px;
  border-left: 5px solid #667eea;
}

.tax-section h3 {
  color: #4a5568;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.tax-results {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.tax-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

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

.tax-item span:first-child {
  color: #4a5568;
  font-weight: 500;
}

.tax-item span:last-child {
  color: #667eea;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Deduction Section */
.deduction-section {
  background: #fff5f5;
  padding: 25px;
  border-radius: 15px;
  border-left: 5px solid #e53e3e;
  margin-bottom: 25px;
}

.deduction-section h3 {
  color: #4a5568;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.deduction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #fed7d7;
}

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

.deduction-item span:first-child {
  color: #4a5568;
  font-weight: 500;
}

.deduction-item span:last-child {
  color: #e53e3e;
  font-weight: bold;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.deduction-item.total-deduction {
  background: #fed7d7;
  margin: 10px -15px;
  padding: 15px;
  border-radius: 8px;
  font-weight: bold;
}

.deduction-item.total-deduction span:last-child {
  font-size: 1.1rem;
}

/* Summary Section */
.summary-section {
  background: #f0f4f8;
  padding: 25px;
  border-radius: 15px;
  border-left: 5px solid #48bb78;
}

.summary-section h3 {
  color: #4a5568;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

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

.summary-item span:first-child {
  color: #4a5568;
  font-weight: 500;
}

.summary-item span:last-child {
  color: #48bb78;
  font-weight: bold;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* AdSense Styles */
.ad-section {
  margin: 40px 0;
  display: flex;
  justify-content: center;
}

.ad-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  max-width: 728px;
  width: 100%;
}

.ad-label {
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
}

.ad-content {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
}

.ad-placeholder {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.ad-placeholder p {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.ad-placeholder small {
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Footer */
footer {
  text-align: center;
  color: white;
  opacity: 0.8;
  font-size: 1.1rem;
}

/* Comparison Section Styles */
.comparison-section {
  margin-top: 30px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.comparison-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 15px;
  padding: 20px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.comparison-card:hover {
  border-color: #667eea;
  transform: translateY(-5px);
}

.comparison-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #dee2e6;
}

.comparison-icon {
  font-size: 24px;
  margin-right: 10px;
}

.comparison-header h4 {
  color: #495057;
  font-size: 18px;
  font-weight: 600;
}

.comparison-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comparison-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.comparison-label {
  color: #6c757d;
  font-weight: 500;
}

.comparison-value {
  color: #495057;
  font-weight: 600;
  font-size: 16px;
}

.difference-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  margin-top: 20px;
}

.difference-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.difference-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.difference-label {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.difference-value {
  font-size: 24px;
  font-weight: 700;
}

/* Input with Unit Styles */
.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-unit .modern-input {
  padding-right: 50px;
  flex: 1;
}

.input-unit {
  position: absolute;
  right: 15px;
  color: #6c757d;
  font-weight: 500;
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .calculator-section {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 25px;
  }

  header h1 {
    font-size: 2.5rem;
  }

  .take-home-section {
    padding: 20px;
  }

  .take-home-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 12px 0;
  }

  .take-home-item.main-result {
    margin: -10px -20px 10px -20px;
    padding: 15px 20px;
  }

  .take-home-item span:last-child {
    font-size: 1.1rem;
    word-break: break-all;
  }

  .take-home-item.main-result span:last-child {
    font-size: 1.4rem;
  }

  .deduction-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .summary-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .ad-container {
    max-width: 100%;
    padding: 15px;
  }

  .ad-content {
    min-height: 60px;
  }

  .ad-placeholder p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  .calculator-section {
    padding: 20px;
  }

  header h1 {
    font-size: 2rem;
  }

  .take-home-section {
    padding: 15px;
  }

  .take-home-item.main-result {
    margin: -8px -15px 8px -15px;
    padding: 12px 15px;
  }

  .take-home-item span:last-child {
    font-size: 1rem;
  }

  .take-home-item.main-result span:last-child {
    font-size: 1.2rem;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-card {
  animation: fadeInUp 0.6s ease-out;
}

.result-card:nth-child(2) {
  animation-delay: 0.1s;
}

.result-card:nth-child(3) {
  animation-delay: 0.2s;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a67d8;
}

/* Enhanced Button Styles */
.calendar-group,
.gender-group {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.calendar-button,
.gender-button {
  flex: 1;
  background: #f8f9fa;
  border: 2px solid #e2e8f0;
  border-radius: 15px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  overflow: hidden;
}

.calendar-button::before,
.gender-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s;
}

.calendar-button:hover::before,
.gender-button:hover::before {
  left: 100%;
}

.calendar-button:hover,
.gender-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.calendar-button.active,
.gender-button.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.button-icon {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.calendar-button.active .button-icon,
.gender-button.active .button-icon {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.button-text {
  flex: 1;
  text-align: left;
}

.button-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #4a5568;
}

.calendar-button.active .button-title,
.gender-button.active .button-title {
  color: white;
}

.button-subtitle {
  display: block;
  font-size: 0.85rem;
  opacity: 0.7;
  color: #718096;
}

.calendar-button.active .button-subtitle,
.gender-button.active .button-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

/* Enhanced Fortune Button */
.fortune-button {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 20px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.fortune-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s;
}

.fortune-button:hover::before {
  left: 100%;
}

.fortune-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.fortune-button:active {
  transform: translateY(-1px);
}

.button-content {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.fortune-button .button-icon {
  font-size: 2.5rem;
  background: rgba(255, 255, 255, 0.2);
  width: 60px;
  height: 60px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.fortune-button .button-text {
  flex: 1;
  text-align: left;
}

.fortune-button .button-title {
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.fortune-button .button-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.button-arrow {
  font-size: 1.5rem;
  color: white;
  transition: transform 0.3s ease;
}

.fortune-button:hover .button-arrow {
  transform: translateX(5px);
}

/* Enhanced Fortune Result Animations */
.fortune-section {
  animation: fadeInUp 0.8s ease-out;
}

.fortune-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.fortune-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.6s;
}

.fortune-card:hover::before {
  left: 100%;
}

.fortune-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.fortune-summary {
  font-size: 1rem;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );
  border-radius: 8px;
  border-left: 3px solid #667eea;
  line-height: 1.6;
  white-space: pre-line;
}

.fortune-total-score {
  font-size: 1.8rem;
  font-weight: 700;
  color: #667eea;
  margin: 15px 0;
  padding: 12px 20px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );
  border-radius: 12px;
  border: 2px solid #667eea;
  text-align: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.fortune-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-top: 20px;
}

.fortune-card h4 {
  margin-bottom: 4px;
}

.fortune-score {
  font-size: 1.5rem;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
  animation: twinkle 2s infinite;
  margin-top: 2px;
  margin-bottom: 4px;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.fortune-advice {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 15px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

.fortune-advice::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 10s linear infinite;
}

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

.fortune-advice h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.fortune-advice p {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  line-height: 1.6;
}

.fortune-lucky {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 25px;
  margin: 20px 0;
}

.lucky-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.lucky-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.lucky-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.lucky-item span:first-child {
  font-weight: 600;
  color: #4a5568;
}

.lucky-item span:last-child {
  font-weight: 700;
  color: #667eea;
  font-size: 1.1rem;
}

/* Fortune Detail Styles */
.fortune-detail {
  margin-top: 15px;
  padding: 12px;
  background: rgba(102, 126, 234, 0.1);
  border-left: 3px solid #667eea;
  border-radius: 8px;
  font-size: 0.9rem;
}

.detail-label {
  font-weight: 600;
  color: #667eea;
  display: block;
  margin-bottom: 5px;
}

.detail-content {
  color: #4a5568;
  line-height: 1.5;
  display: block;
}

/* Fortune Extra Section */
.fortune-extra {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fortune-best-time,
.fortune-taboos,
.fortune-insight {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 25px;
  transition: all 0.3s ease;
}

.fortune-best-time:hover,
.fortune-taboos:hover,
.fortune-insight:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fortune-best-time h3,
.fortune-taboos h3,
.fortune-insight h3 {
  color: #4a5568;
  margin-bottom: 15px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fortune-best-time p {
  color: #4a5568;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.fortune-taboos ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fortune-taboos ul li {
  padding: 10px 15px;
  margin-bottom: 8px;
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  border-radius: 5px;
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.5;
}

.fortune-taboos ul li:last-child {
  margin-bottom: 0;
}

.fortune-insight p {
  color: #4a5568;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  font-style: italic;
  background: rgba(102, 126, 234, 0.05);
  padding: 15px;
  border-radius: 8px;
}

/* Loading Spinner */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Alert Message Styles */
.alert-message {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  animation: slideInRight 0.3s ease-out;
}

.alert-content {
  background: #ff6b6b;
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  min-width: 300px;
}

.alert-icon {
  font-size: 1.2rem;
}

.alert-text {
  flex: 1;
  font-weight: 500;
}

.alert-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  transition: opacity 0.3s ease;
}

.alert-close:hover {
  opacity: 0.7;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design for New Buttons */
@media (max-width: 768px) {
  .calendar-group,
  .gender-group {
    flex-direction: column;
    gap: 10px;
  }

  .calendar-button,
  .gender-button {
    padding: 15px;
  }

  .button-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .fortune-button {
    padding: 20px;
  }

  .fortune-button .button-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }

  .lucky-items {
    grid-template-columns: 1fr;
  }

  .alert-content {
    min-width: 250px;
    padding: 12px 15px;
  }
}

/* 금액 단위 스타일 */
.amount-input-container {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.amount-input-container input {
  flex: 1;
  width: auto !important;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
}

.amount-input-container input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.amount-unit {
  width: auto !important;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 90px;
  flex-shrink: 0;
}

.amount-unit:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.amount-unit:hover {
  border-color: #667eea;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .amount-input-container {
    flex-direction: column;
    gap: 8px;
  }

  .amount-unit {
    width: 100%;
    min-width: auto;
  }
}

/* 운세 페이지 광고 레이아웃 */
.fortune-layout {
  display: flex;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.fortune-layout .container {
  flex: 1;
  max-width: none;
  margin: 0;
  padding: 20px;
  background: transparent;
}

/* 광고 사이드바 */
.ad-sidebar {
  width: 220px;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  align-items: center;
}

.ad-left {
  order: -1;
}

.ad-right {
  order: 1;
}

/* 광고 배너 */
.ad-banner {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid rgba(102, 126, 234, 0.2);
  width: 200px;
  height: 300px;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 쿠팡 파트너스 광고 스타일 */
.ad-banner script + script {
  display: block;
}

/* 쿠팡 광고가 생성하는 모든 요소에 대한 스타일 */
.ad-banner iframe,
.ad-banner div[id*="coupang"],
.ad-banner div[class*="coupang"],
.ad-banner div[id*="943142"],
.ad-banner div[id*="943143"],
.ad-banner > div {
  max-width: 200px !important;
  width: 200px !important;
  min-width: 200px !important;
  max-height: 300px !important;
  height: 300px !important;
  min-height: 300px !important;
  overflow: hidden !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* 쿠팡 광고 내부 요소들 */
.ad-banner iframe {
  border: none !important;
  display: block !important;
}

.ad-placeholder {
  text-align: center;
  padding: 20px 10px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 8px;
  border: 2px dashed #cbd5e0;
  transition: all 0.3s ease;
}

.ad-placeholder:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
  border-color: #667eea;
}

.ad-placeholder h3 {
  color: #4a5568;
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.ad-placeholder p {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.ad-size {
  background: #667eea;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
}

/* 반응형 광고 레이아웃 */
@media (max-width: 1200px) {
  .ad-sidebar {
    width: 220px;
  }
}

@media (max-width: 1024px) {
  .fortune-layout {
    flex-direction: column;
  }

  .ad-sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px 20px;
    order: 2;
  }

  .ad-banner {
    min-width: 200px;
    flex-shrink: 0;
  }

  .fortune-layout .container {
    order: 1;
  }
}

@media (max-width: 768px) {
  .ad-sidebar {
    flex-direction: column;
    gap: 15px;
  }

  .ad-banner {
    min-width: auto;
  }

  .ad-placeholder {
    padding: 15px;
  }
}

/* 칼로리 계산기 스타일 */
.menu-section {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.menu-categories {
  margin-bottom: 30px;
}

.category-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-button {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  color: #6c757d;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
}

.tab-button:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.tab-button.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.menu-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.menu-item {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 15px;
  padding: 20px;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-item:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.menu-info h4 {
  color: #2d3748;
  margin-bottom: 5px;
  font-size: 16px;
}

.menu-category {
  color: #718096;
  font-size: 14px;
  margin: 0;
}

.menu-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.portion-size {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  min-width: 120px;
}

.add-menu-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 14px;
}

.add-menu-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.selected-items {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  border: 2px solid #e9ecef;
}

.selected-items h3 {
  color: #2d3748;
  margin-bottom: 15px;
  font-size: 18px;
}

.selected-menu-list {
  max-height: 300px;
  overflow-y: auto;
}

.empty-message {
  text-align: center;
  color: #718096;
  font-style: italic;
  padding: 20px;
}

.selected-menu-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.selected-menu-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.menu-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-name {
  font-weight: 500;
  color: #2d3748;
  font-size: 14px;
}

.menu-calories {
  color: #667eea;
  font-weight: 600;
  font-size: 14px;
}

.menu-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity {
  background: #e2e8f0;
  color: #4a5568;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.remove-btn {
  background: #e53e3e;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.remove-btn:hover {
  background: #c53030;
  transform: scale(1.1);
}

.calorie-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.calorie-item {
  background: white;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.calorie-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.calorie-item.main-result {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: scale(1.05);
}

.calorie-item span:first-child {
  display: block;
  font-size: 14px;
  color: #718096;
  margin-bottom: 8px;
  font-weight: 500;
}

.calorie-item.main-result span:first-child {
  color: rgba(255, 255, 255, 0.8);
}

.calorie-item span:last-child {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #2d3748;
}

.calorie-item.main-result span:last-child {
  color: white;
}

.calorie-analysis {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.calorie-analysis h3 {
  color: #2d3748;
  margin-bottom: 20px;
  font-size: 20px;
}

.analysis-content h4 {
  margin: 15px 0 10px 0;
  font-size: 16px;
}

.analysis-good {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.analysis-good h4 {
  color: #22543d;
  margin: 0 0 8px 0;
}

.analysis-warning {
  background: #fffbeb;
  border: 1px solid #f6e05e;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.analysis-warning h4 {
  color: #744210;
  margin: 0 0 8px 0;
}

.analysis-danger {
  background: #fed7d7;
  border: 1px solid #feb2b2;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.analysis-danger h4 {
  color: #742a2a;
  margin: 0 0 8px 0;
}

.analysis-tips {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 15px;
}

.analysis-tips h4 {
  color: #2d3748;
  margin: 0 0 10px 0;
}

.analysis-tips ul {
  margin: 0;
  padding-left: 20px;
}

.analysis-tips li {
  color: #4a5568;
  margin-bottom: 5px;
  font-size: 14px;
}

/* 칼로리 계산기 모바일 반응형 */
@media (max-width: 768px) {
  .category-tabs {
    flex-direction: column;
  }

  .tab-button {
    text-align: center;
  }

  .menu-items {
    grid-template-columns: 1fr;
  }

  .menu-item {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .menu-actions {
    width: 100%;
    justify-content: center;
  }

  .portion-size {
    min-width: 150px;
  }

  .calorie-summary {
    grid-template-columns: 1fr;
  }

  .calorie-item.main-result {
    transform: none;
  }

  .selected-menu-item {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .menu-controls {
    justify-content: center;
  }
}

/* Enhanced Lunch Picker Styles */
.controls-header {
  text-align: center;
  margin-bottom: 30px;
}

.controls-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-top: 5px;
}

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

.category-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.category-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-content {
  text-align: center;
  color: white;
}

.category-emoji {
  font-size: 2.5em;
  margin-bottom: 10px;
  display: block;
}

.category-label {
  font-size: 16px;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

.category-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 10px;
  display: inline-block;
}

.category-card.selected {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.category-card.selected::before {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  background: #4caf50;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Portion Slider Styles */
.portion-slider-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 25px;
  margin-top: 20px;
}

.portion-slider {
  margin-bottom: 20px;
}

.portion-slider input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 15px;
}

.portion-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.portion-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.slider-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.slider-label.active {
  color: white;
  font-weight: 600;
  transform: scale(1.1);
}

.slider-descriptions {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.portion-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 15px;
}

.portion-icon {
  font-size: 2em;
}

.portion-text {
  color: white;
  font-weight: 600;
  font-size: 16px;
}

/* Enhanced Button Styles */
.pick-button {
  position: relative;
  overflow: hidden;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
  background-size: 300% 300%;
  animation: gradientShift 3s ease infinite;
  border: none;
  border-radius: 25px;
  padding: 20px 40px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pick-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.pick-button:active {
  transform: translateY(-1px);
}

.pick-button:disabled {
  background: rgba(255, 255, 255, 0.2);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button-content {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.button-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.pick-button:hover .button-shine {
  left: 100%;
}

.pick-tip {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  margin-top: 10px;
}

/* Result Section Enhancements */
.result-header {
  text-align: center;
  margin-bottom: 30px;
}

.result-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-top: 5px;
}

.result-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.spinning-dice {
  font-size: 3em;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 15px 20px;
}

.stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  margin-bottom: 5px;
}

.stat-value {
  color: white;
  font-size: 18px;
  font-weight: 600;
}

/* History Section Enhancements */
.history-header {
  text-align: center;
  margin-bottom: 20px;
}

.history-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-top: 5px;
}

.history-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 14px;
}

.history-count {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.history-page-info {
  color: rgba(255, 255, 255, 0.7);
}

.history-container {
  margin-bottom: 20px;
}

.history-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
}

.pagination-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.pagination-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pagination-info {
  color: white;
  font-weight: 600;
  font-size: 16px;
  min-width: 80px;
  text-align: center;
}

.history-actions {
  text-align: center;
  margin-top: 20px;
}

.clear-history-button {
  background: rgba(255, 107, 107, 0.2);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ff6b6b;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.clear-history-button:hover {
  background: rgba(255, 107, 107, 0.3);
  transform: translateY(-2px);
}

/* Action Button Enhancements */
.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 20px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.action-button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-button.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.action-button.primary {
  background: linear-gradient(45deg, #4ecdc4, #45b7d1);
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.action-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* AdSense 광고 영역 스타일 */
.ad-section {
  margin: 30px 0;
  display: flex;
  justify-content: center;
}

.ad-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.ad-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ad-content {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-content ins {
  display: block !important;
  width: 100%;
  max-width: 728px;
}

/* AdSense 반응형 광고 */
.adsbygoogle {
  display: block !important;
  width: 100%;
  height: auto;
  min-height: 90px;
}

/* Mobile Responsive for Lunch Picker */
@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .category-card {
    padding: 15px;
  }

  .category-emoji {
    font-size: 2em;
  }

  .result-stats {
    flex-direction: column;
    gap: 15px;
  }

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

  .pick-button {
    padding: 15px 30px;
    font-size: 16px;
  }

  .history-stats {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .history-pagination {
    flex-direction: column;
    gap: 15px;
  }

  .pagination-button {
    width: 100%;
    justify-content: center;
  }

  .ad-container {
    padding: 15px;
    margin: 0 10px;
  }

  .ad-content {
    min-height: 50px;
  }
}

/* 계산기 현대적 UI 스타일 */
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.section-header p {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 0;
}

.input-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.input-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.input-row:last-child {
  margin-bottom: 0;
}

.label-icon {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

.modern-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e1e8ed;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.modern-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modern-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e1e8ed;
  border-radius: 12px;
  font-size: 1rem;
  background: #fafbfc;
  transition: all 0.3s ease;
  cursor: pointer;
}

.modern-select:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
}

.modern-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: #2c3e50;
}

.modern-checkbox input[type="checkbox"] {
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

.checkbox-text {
  font-weight: 500;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.result-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 1.5rem;
  color: white;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.result-card.main-result {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 8px 30px rgba(240, 147, 251, 0.3);
}

.result-card.main-result:hover {
  box-shadow: 0 12px 40px rgba(240, 147, 251, 0.4);
}

.result-icon {
  font-size: 2rem;
  margin-right: 1rem;
  opacity: 0.9;
}

.result-content {
  display: flex;
  flex-direction: column;
}

.result-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.deduction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.deduction-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.deduction-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.deduction-card.total-card {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(252, 182, 159, 0.3);
}

.deduction-icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
  opacity: 0.8;
}

.deduction-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.deduction-label {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-bottom: 0.25rem;
}

.deduction-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
}

.total-card .deduction-label {
  color: #8b4513;
}

.total-card .deduction-value {
  color: #8b4513;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.summary-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.summary-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.summary-icon {
  font-size: 1.8rem;
  margin-right: 1rem;
  opacity: 0.8;
}

.summary-content {
  display: flex;
  flex-direction: column;
}

.summary-label {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 0.25rem;
}

.summary-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .input-row {
    grid-template-columns: 1fr;
  }

  .result-cards {
    grid-template-columns: 1fr;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .deduction-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    padding: 1rem;
  }

  .result-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
  }

  .result-value {
    font-size: 1.2rem;
  }
}

/* 궁합보기 스타일 */
.compatibility-input-section {
  margin-bottom: 40px;
}

.person-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.person-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 25px;
  transition: all 0.3s ease;
}

.person-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.person-header {
  text-align: center;
  margin-bottom: 20px;
}

.person-header h3 {
  color: white;
  font-size: 18px;
  margin: 0;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  color: #2d3748;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 10px;
  color: #2d3748;
  font-size: 14px;
  transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
  color: #a0aec0;
}

.time-input-container {
  position: relative;
}

.time-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.time-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.time-input-group label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  margin: 0;
}

.time-input-group input[type="number"] {
  width: 60px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.time-input-group input[type="number"]:focus {
  outline: none;
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
  background: rgba(255, 255, 255, 0.15);
}

.time-input-group input[type="number"]::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

.time-separator {
  font-size: 24px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 15px;
}

.time-help-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 10px;
  text-align: center;
}

.calculate-button-container {
  text-align: center;
  margin-top: 30px;
}

.calculate-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  border: none;
  border-radius: 50px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.calculate-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.calculate-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* 궁합 결과 스타일 */
.compatibility-result-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
}

.result-header {
  text-align: center;
  margin-bottom: 30px;
}

.result-header h2 {
  color: white;
  font-size: 28px;
  margin: 0 0 10px 0;
}

.couple-names {
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  font-weight: 500;
}

.compatibility-type {
  margin-top: 15px;
  text-align: center;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  padding: 12px 24px;
  border-radius: 25px;
  margin-bottom: 8px;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.type-emoji {
  font-size: 20px;
}

.type-name {
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.type-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-style: italic;
}

.compatibility-scores {
  margin-bottom: 30px;
}

.main-score {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  margin-bottom: 25px;
  text-align: center;
}

.score-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
}

.score-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.score-icon {
  font-size: 2.5em;
  min-width: 60px;
  text-align: center;
}

.score-content h3,
.score-content h4 {
  color: white;
  margin: 0 0 8px 0;
  font-size: 16px;
}

.score-content h3 {
  font-size: 20px;
}

.score-value {
  color: #ff6b6b;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 5px;
}

.score-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.compatibility-analysis,
.compatibility-advice {
  margin-bottom: 25px;
}

.compatibility-analysis h3,
.compatibility-advice h3 {
  color: white;
  font-size: 20px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.analysis-content,
.advice-content {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.analysis-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.analysis-item h4 {
  color: white;
  margin: 0 0 10px 0;
  font-size: 16px;
}

.analysis-item p {
  margin: 5px 0;
  font-size: 14px;
}

.result-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-button.primary {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
}

.action-button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 월별 상환금 리스트 스타일 */
.schedule-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin: 20px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.schedule-controls {
  text-align: center;
  margin-bottom: 20px;
}

.schedule-btn {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.schedule-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.schedule-table {
  overflow-x: auto;
  margin-top: 20px;
}

.schedule-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.schedule-table th {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 15px 10px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.schedule-table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.schedule-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.schedule-table tr:hover {
  background-color: #e3f2fd;
  transition: background-color 0.2s ease;
}

.schedule-table tr:last-child td {
  border-bottom: none;
  font-weight: 600;
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .person-inputs {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .person-card {
    padding: 20px;
  }

  .score-grid {
    grid-template-columns: 1fr;
  }

  .result-actions {
    flex-direction: column;
    align-items: center;
  }

  .action-button {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .calculate-button {
    padding: 15px 30px;
    font-size: 16px;
  }
}

/* 파트너스 문구 스타일 */
.partnership-disclosure {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 20px;
}

.partnership-disclosure p {
  font-size: 12px;
  color: #333;
  margin: 0;
  line-height: 1.4;
}
