/* ================================
   Free Tools Website - style.css
   ================================ */

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

:root {
    --primary: #6c63ff;
    --secondary: #f50057;
    --dark: #0f0f1a;
    --dark2: #1a1a2e;
    --card-bg: #1e1e3a;
    --text: #e0e0e0;
    --text-light: #a0a0b0;
    --border: rgba(108, 99, 255, 0.2);
    --gradient: linear-gradient(135deg, #6c63ff, #f50057);
    --success: #00e676;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
}

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

/* ===== Navbar ===== */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 15px 0;
    background: rgba(15,15,26,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.navbar .container { display: flex; justify-content: space-between; align-items: center; }

.logo { font-size: 1.5rem; font-weight: 700; color: var(--text); text-decoration: none; }
.logo span { color: var(--primary); }

.nav-links { display: flex; list-style: none; gap: 25px; }
.nav-links a { color: var(--text-light); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }

/* ===== Hero ===== */
.hero {
    min-height: 50vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
    background: radial-gradient(ellipse at top, rgba(108,99,255,0.15) 0%, transparent 60%);
}

.hero-badge {
    display: inline-block;
    background: rgba(108,99,255,0.15);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    margin-bottom: 15px;
}

.hero h1 {
    font-size: 3rem; font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

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

.hero-stats { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.hero-stat h3 { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.hero-stat p { color: var(--text-light); font-size: 0.85rem; }

/* ===== Tools Grid ===== */
.tools-section { padding: 60px 0; }

.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 10px; }
.section-title span { color: var(--primary); }
.section-desc { text-align: center; color: var(--text-light); margin-bottom: 40px; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    display: block;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(108,99,255,0.2);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.tool-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.tool-card p { color: var(--text-light); font-size: 0.85rem; line-height: 1.5; }

.tool-badge {
    display: inline-block;
    background: rgba(0,230,118,0.1);
    color: var(--success);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    margin-top: 10px;
    border: 1px solid rgba(0,230,118,0.2);
}

/* ===== Tool Page ===== */
.tool-page { padding: 100px 0 60px; min-height: 100vh; }

.tool-header { text-align: center; margin-bottom: 40px; }
.tool-header .back-btn {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-light); text-decoration: none;
    font-size: 0.9rem; margin-bottom: 20px;
    transition: color 0.3s;
}
.tool-header .back-btn:hover { color: var(--primary); }
.tool-header h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 10px; }
.tool-header h1 span { color: var(--primary); }
.tool-header p { color: var(--text-light); }

.tool-container {
    max-width: 700px; margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 35px;
}

/* ===== Form Elements ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-light); }

input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus, textarea:focus, select:focus { border-color: var(--primary); }
textarea { min-height: 150px; resize: vertical; }

.checkbox-group { display: flex; gap: 20px; flex-wrap: wrap; }
.checkbox-group label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* ===== Buttons ===== */
.btn {
    padding: 12px 28px; border-radius: 10px; border: none;
    font-family: 'Poppins', sans-serif; font-size: 0.95rem;
    font-weight: 500; cursor: pointer; transition: all 0.3s;
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient); color: white;
    box-shadow: 0 4px 20px rgba(108,99,255,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,0.6); }

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border); color: var(--text);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-success { background: rgba(0,230,118,0.15); color: var(--success); border: 1px solid rgba(0,230,118,0.3); }

.btn-group { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ===== Result Box ===== */
.result-box {
    margin-top: 25px;
    padding: 20px;
    background: rgba(108,99,255,0.08);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: none;
}

.result-box.show { display: block; }
.result-box h4 { color: var(--primary); margin-bottom: 10px; font-size: 0.9rem; }

.result-value {
    font-size: 1.8rem; font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== Range Slider ===== */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%; height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px; outline: none;
    padding: 0; border: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px;
    background: var(--primary);
    border-radius: 50%; cursor: pointer;
    box-shadow: 0 0 8px rgba(108,99,255,0.6);
}

/* ===== QR Code ===== */
#qr-output {
    display: flex; justify-content: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin: 20px auto;
    width: fit-content;
}

/* ===== Password Display ===== */
.password-display {
    display: flex; align-items: center; gap: 10px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    word-break: break-all;
}

.password-display span { flex: 1; }

.strength-bar { height: 6px; border-radius: 3px; margin-top: 10px; transition: all 0.3s; }
.strength-weak { background: #f44336; width: 30%; }
.strength-medium { background: #ff9800; width: 60%; }
.strength-strong { background: #4caf50; width: 100%; }

/* ===== Word Counter ===== */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 20px; }
.stat-item {
    background: rgba(108,99,255,0.08);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}
.stat-item h3 { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-item p { color: var(--text-light); font-size: 0.8rem; }

/* ===== Age Calculator ===== */
.age-result {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 15px; margin-top: 20px;
}

.age-item {
    background: rgba(108,99,255,0.08);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.age-item h2 { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.age-item p { color: var(--text-light); font-size: 0.85rem; }

/* ===== Footer ===== */
.footer {
    background: var(--dark2);
    border-top: 1px solid var(--border);
    padding: 25px 0;
    text-align: center;
    margin-top: 60px;
}

.footer p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 10px; }
.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 1024px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 2rem; }
    .stats-grid, .age-result { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}
@media (max-width: 480px) { .tools-grid { grid-template-columns: 1fr; } }
