/* MangoRockets Tools - Global Stylesheet */

/* CSS Custom Properties */
:root {
  --primary-color: #ff6b35;
  --primary-dark: #e55a2b;
  --secondary-color: #004e89;
  --accent-color: #1a659e;
  --text-color: #2b2d42;
  --text-light: #6c757d;
  --bg-color: #ffffff;
  --bg-light: #f8f9fa;
  --bg-gray: #e9ecef;
  --border-color: #dee2e6;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "맑은 고딕", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

/* Header & Navigation */
header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo:hover {
  color: var(--primary-dark);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Main Content */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 0;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-gray) 100%);
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Tool Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.tool-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.tool-card h3 {
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.tool-card .btn {
  width: 100%;
}

/* Tool Container (for individual tool pages) */
.tool-container {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.tool-title {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.tool-title h1 {
  color: var(--secondary-color);
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="color"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background-color: var(--bg-color);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.6;
}

/* Range Slider */
input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-gray);
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

input[type="range"]::-moz-range-thumb:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-item label {
  cursor: pointer;
  margin: 0;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-block {
  width: 100%;
  display: block;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
}

/* Button Groups */
.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Results Display */
.result-box {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.result-label {
  font-weight: 600;
  color: var(--text-color);
}

.result-value {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.125rem;
}

/* Preview/Display Areas */
.preview-area {
  background: var(--bg-light);
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}

.color-preview {
  width: 100%;
  height: 200px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* Strength Indicator */
.strength-indicator {
  margin-top: 1rem;
}

.strength-bar {
  height: 8px;
  background: var(--bg-gray);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.strength-fill {
  height: 100%;
  transition: var(--transition);
  border-radius: 4px;
}

.strength-fill.weak {
  width: 25%;
  background-color: var(--danger-color);
}

.strength-fill.medium {
  width: 50%;
  background-color: var(--warning-color);
}

.strength-fill.strong {
  width: 75%;
  background-color: var(--success-color);
}

.strength-fill.very-strong {
  width: 100%;
  background-color: #155724;
}

.strength-text {
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Tool Guide Section */
.tool-guide {
  background: var(--bg-light);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-top: 3rem;
}

.tool-guide h2 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.tool-guide p {
  color: var(--text-color);
  line-height: 1.8;
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: white;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(43, 45, 66, 0.95);
  color: white;
  padding: 1.5rem;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-content p {
  margin: 0;
  flex: 1;
  min-width: 250px;
}

.cookie-content .btn {
  flex-shrink: 0;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-light);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    justify-content: center;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tool-container {
    padding: 1.5rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-content .btn {
    width: 100%;
  }

  .result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .footer-content {
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
