/**
 * Password Generator - GreenGetWare Theme
 */
:root {
  --primary: #39d353;
  --primary-dark: #176f3c;
  --primary-gradient: linear-gradient(135deg, #39d353 0%, #176f3c 100%);
  --primary-light: rgba(57, 211, 83, 0.15);
  --accent: #ef4444;
  --accent-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --bg-primary: #0a0a12;
  --bg-secondary: #10101c;
  --bg-tertiary: #1a1a2e;
  --bg-card: rgba(18, 18, 30, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  --strength-weak: #ef4444;
  --strength-fair: #f59e0b;
  --strength-good: #3b82f6;
  --strength-strong: #39d353;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.95);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(239, 68, 68, 0.08) 0%, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

.container { max-width: 700px; margin: 0 auto; padding: 0 var(--space-lg); }
.text-gradient { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.app-header { background: var(--bg-card); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-color); padding: var(--space-md) 0; position: sticky; top: 0; z-index: 100; }
.brand-section { display: flex; flex-direction: column; gap: 2px; }
.logo { display: flex; align-items: center; gap: var(--space-sm); font-size: 1.5rem; font-weight: 700; color: var(--text-primary); text-decoration: none; }
.logo i { color: var(--accent); font-size: 1.75rem; }
.brand-badge { font-size: 0.6875rem; color: var(--text-muted); }
.header-actions { display: flex; gap: var(--space-sm); }
.btn-icon { width: 40px; height: 40px; background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.btn-icon:hover { background: var(--primary-gradient); border-color: var(--primary); color: white; }
.btn-home { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); background: var(--primary-gradient); border: none; border-radius: var(--radius-md); color: white; font-weight: 600; text-decoration: none; box-shadow: 0 4px 15px rgba(57, 211, 83, 0.3); transition: all 0.2s; }
.btn-home:hover { transform: translateY(-2px); color: white; }
.btn-home span { display: none; }
@media (min-width: 768px) { .btn-home span { display: inline; } }

.main-content { padding: var(--space-xl) 0; }

.hero-section { text-align: center; margin-bottom: var(--space-xl); padding: var(--space-lg) 0; }
.hero-icon { width: 90px; height: 90px; background: var(--accent-gradient); border-radius: 26px; display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-lg); box-shadow: 0 0 50px rgba(239, 68, 68, 0.4); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-icon i { font-size: 2.5rem; color: white; }
.hero-section h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: var(--space-sm); }
.hero-section p { color: var(--text-secondary); }

.generator-app { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-xl); margin-bottom: var(--space-2xl); }

.password-display { display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); }
.password-display input { flex: 1; padding: var(--space-lg); background: var(--bg-secondary); border: 2px solid var(--border-color); border-radius: var(--radius-md); color: var(--primary); font-size: 1.25rem; font-family: monospace; font-weight: 700; letter-spacing: 1px; }
.password-display button { width: 56px; height: 56px; background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-secondary); cursor: pointer; font-size: 1.25rem; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.password-display button:hover { background: var(--primary); border-color: var(--primary); color: white; }
.password-display button.copied { background: var(--primary); border-color: var(--primary); color: white; }

.strength-meter { margin-bottom: var(--space-xl); }
.strength-bar { height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; margin-bottom: var(--space-xs); }
.strength-bar::before { content: ''; display: block; height: 100%; width: 0; transition: all 0.3s; }
.strength-meter[data-strength="weak"] .strength-bar::before { width: 25%; background: var(--strength-weak); }
.strength-meter[data-strength="fair"] .strength-bar::before { width: 50%; background: var(--strength-fair); }
.strength-meter[data-strength="good"] .strength-bar::before { width: 75%; background: var(--strength-good); }
.strength-meter[data-strength="strong"] .strength-bar::before { width: 100%; background: var(--strength-strong); }
.strength-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }

.options-panel { margin-bottom: var(--space-xl); }
.option-row { padding: var(--space-md) 0; border-bottom: 1px solid var(--border-color); }
.option-row:last-child { border-bottom: none; }
.option-row label { font-size: 0.9375rem; color: var(--text-primary); font-weight: 500; }

.length-control { display: flex; align-items: center; gap: var(--space-md); margin-top: var(--space-sm); }
.length-control input[type="range"] { flex: 1; height: 8px; background: var(--bg-tertiary); border-radius: 4px; -webkit-appearance: none; }
.length-control input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; background: var(--primary-gradient); border-radius: 50%; cursor: pointer; box-shadow: 0 2px 8px rgba(57, 211, 83, 0.4); }
.length-control input[type="number"] { width: 70px; padding: var(--space-sm); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); text-align: center; font-size: 1rem; font-weight: 600; }

.checkbox-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-sm); }
.checkbox-label { display: flex; align-items: center; gap: var(--space-sm); cursor: pointer; }
.checkbox-label input { display: none; }
.checkmark { width: 22px; height: 22px; background: var(--bg-tertiary); border: 2px solid var(--border-color); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.checkbox-label input:checked + .checkmark { background: var(--primary-gradient); border-color: var(--primary); }
.checkmark::after { content: '✓'; color: white; font-size: 0.75rem; opacity: 0; }
.checkbox-label input:checked + .checkmark::after { opacity: 1; }
.char-preview { font-size: 0.625rem; color: var(--text-muted); font-family: monospace; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.generate-btn { width: 100%; padding: var(--space-lg); background: var(--primary-gradient); border: none; border-radius: var(--radius-md); color: white; font-size: 1.125rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: var(--space-sm); box-shadow: 0 8px 25px rgba(57, 211, 83, 0.3); transition: all 0.2s; }
.generate-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(57, 211, 83, 0.4); }

.history-section { margin-top: var(--space-xl); padding-top: var(--space-xl); border-top: 1px solid var(--border-color); }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-md); }
.history-header h3 { font-size: 1rem; display: flex; align-items: center; gap: var(--space-sm); }
.history-header h3 i { color: var(--primary); }
.clear-btn { padding: var(--space-xs) var(--space-md); background: transparent; border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.75rem; cursor: pointer; transition: all 0.2s; }
.clear-btn:hover { border-color: var(--accent); color: var(--accent); }

.history-list { max-height: 200px; overflow-y: auto; }
.history-list .empty-state { text-align: center; padding: var(--space-lg); color: var(--text-muted); }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-sm) var(--space-md); background: var(--bg-glass); border-radius: var(--radius-sm); margin-bottom: var(--space-xs); }
.history-item .password { font-family: monospace; color: var(--text-secondary); font-size: 0.875rem; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.history-item .copy-btn { width: 32px; height: 32px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.history-item .copy-btn:hover { color: var(--primary); }

.features-section { padding-top: var(--space-2xl); border-top: 1px solid var(--border-color); }
.features-section h2 { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: var(--space-xl); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); }
.feature-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-xl); text-align: center; transition: all 0.3s; }
.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.feature-icon { width: 60px; height: 60px; background: rgba(239, 68, 68, 0.15); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-md); }
.feature-icon i { font-size: 1.75rem; color: var(--accent); }
.feature-card h3 { font-size: 1.125rem; margin-bottom: var(--space-sm); }
.feature-card p { font-size: 0.875rem; color: var(--text-secondary); }

.app-footer { padding: var(--space-xl) 0; text-align: center; border-top: 1px solid var(--border-color); margin-top: var(--space-2xl); }
.app-footer p { color: var(--text-muted); font-size: 0.875rem; }

@media (max-width: 768px) {
  .hero-section h1 { font-size: 1.75rem; }
  .password-display input { font-size: 1rem; padding: var(--space-md); }
  .char-preview { display: none; }
}
