/* /style.css - FINAL CREATIVE REDESIGN (v1.3) */

/* --- 1. Design System: Colors, Fonts, and Variables --- */
:root {
  --primary-blue: #4C6EF5;
  --primary-blue-dark: #364fc7;
  --light-gray: #f8f9fa;
  --border-gray: #dee2e6;
  --text-dark: #212529;
  --text-light: #6c757d;
  --background-gradient-start: #ffffff;
  --background-gradient-end: #f0f2f5;
  --shadow-color: rgba(0, 0, 0, 0.05);
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-image: linear-gradient(170deg, var(--background-gradient-start) 0%, var(--background-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- 2. Global Header --- */
.global-header {
  background-color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--border-gray);
  padding: 0 20px;
  height: 60px;
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-logo { font-weight: 700; font-size: 1.3rem; color: var(--text-dark); text-decoration: none; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 25px; }
.main-nav a { text-decoration: none; color: var(--text-light); font-size: 1rem; font-weight: 500; transition: color 0.2s ease; }
.main-nav a:hover { color: var(--primary-blue); }
.main-nav a.active-link { color: var(--primary-blue); font-weight: 700; }

/* --- 3. Homepage Styles --- */
.hero { max-width: 800px; margin: 80px auto 60px auto; text-align: center; }
.hero h1 { font-size: 3.5rem; font-weight: 700; margin-bottom: 15px; letter-spacing: -1.5px; }
.hero p { font-size: 1.25rem; color: var(--text-light); line-height: 1.6; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.tool-card {
  background-color: #fff;
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 30px;
  text-decoration: none;
  color: var(--text-dark);
  text-align: left;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 15px var(--shadow-color);
}
.tool-card:hover { transform: translateY(-6px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); }
.tool-card h2 { margin: 15px 0 10px 0; font-size: 1.25rem; color: var(--primary-blue); }
.tool-card p { color: var(--text-light); font-size: 1rem; line-height: 1.6; margin: 0; }
.tool-card .icon { color: var(--primary-blue); }

/* --- 4. Unified Tool Page Styles --- */
.tool-container { max-width: 1200px; margin: 60px auto; padding: 0 20px; }
.tool-header { text-align: center; margin-bottom: 40px; }
.tool-header h1 { font-size: 2.8rem; letter-spacing: -1px; margin-bottom: 10px; }
.tool-header p { font-size: 1.1rem; color: var(--text-light); max-width: 700px; margin: 0 auto; }

.tool-controls { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; background-color: #e9ecef; padding: 8px; border-radius: 10px; }
.tool-controls label { cursor: pointer; padding: 10px 20px; border-radius: 8px; font-weight: 500; transition: all 0.2s ease-in-out; }
.tool-controls input[type="radio"] { display: none; }
.tool-controls input[type="radio"]:checked + label { background-color: #fff; color: var(--primary-blue); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }

.io-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background-color: #fff;
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px var(--shadow-color);
}
.io-header { display: flex; justify-content: space-between; align-items: center; padding: 0 0 10px 0; border-bottom: 1px solid var(--border-gray); margin-bottom: 10px; }
.io-header span { font-weight: 500; }
.stats { font-size: 0.9rem; color: var(--text-light); }

textarea {
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: 'Menlo', 'Courier New', monospace;
  font-size: 1rem;
  resize: none;
  min-height: 350px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(76, 110, 245, 0.2); }

.action-bar { display: flex; justify-content: center; gap: 15px; margin-top: 25px; }
.action-bar button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.action-bar button:hover { background-color: var(--primary-blue-dark); transform: translateY(-2px); }
.action-bar button#clear-btn { background-color: #6c757d; }
.action-bar button#clear-btn:hover { background-color: #5a6268; }

/* --- 5. Content Section Styles --- */
/* Default style for blog, privacy, etc. */
.content-section {
    max-width: 800px; /* Narrower for text-heavy pages */
    margin: 80px auto;
    text-align: left;
    line-height: 1.7;
    background-color: #fff;
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

/* FIXED: Wider style for content sections that are part of a tool page */
.tool-container .content-section {
    max-width: 100%; /* Use the full width of the parent container */
    padding: 0 20px; /* Match the tool container's padding */
}

.content-section h2 { border-bottom: 1px solid var(--border-gray); padding-bottom: 10px; margin-top: 0; margin-bottom: 20px; }

/* --- 6. Footer and Other Elements --- */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    background-color: var(--background-gradient-end);
    border-top: 1px solid var(--border-gray);
    color: var(--text-light);
}
.footer-links a { color: var(--text-light); margin: 0 10px; text-decoration: none; }
.footer-links a:hover { color: var(--primary-blue); }

#copy-toast { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); background-color: var(--text-dark); color: white; padding: 15px 25px; border-radius: 8px; font-weight: 500; transition: bottom 0.5s ease-in-out; z-index: 1000; }
#copy-toast.show { bottom: 30px; }