/* =========================================
   Global Variables & Reset
========================================= */
:root {
    --primary-color: #4361EE; 
    --secondary-color: #F72585; 
    --bg-color: #F4F7FE; 
    --card-bg: #FFFFFF;
    --text-main: #2B2D42;
    --text-muted: #8D99AE;
    --border-radius: 20px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    
    /* Password Strength Colors */
    --strength-weak: #EF476F;
    --strength-medium: #FFD166;
    --strength-strong: #06D6A0;
}

body.dark-mode {
    --bg-color: #0F172A; 
    --card-bg: #1E293B; 
    --text-main: #F8FAFC; 
    --text-muted: #94A3B8; 
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   Navbar (Header)
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: var(--card-bg);
    box-shadow: var(--box-shadow);
    transition: background-color 0.3s ease;
}

.logo {
    font-size: 20px;
    font-weight: 800;
}

.highlight {
    color: var(--primary-color);
}

.theme-btn {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.2) rotate(15deg);
}

/* =========================================
   Main Tool Layout
========================================= */
.tool-container {
    display: flex;
    justify-content: center;
    padding: 60px 5%;
}

.tool-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 600px;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: background-color 0.3s ease;
}

.card-header {
    margin-bottom: 10px;
}

.tool-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* =========================================
   Password Display Area
========================================= */
.password-display {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border-radius: 15px;
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 2px dashed rgba(141, 153, 174, 0.3);
}

#password-result {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-align: center;
    outline: none;
    letter-spacing: 2px;
}

.copy-btn {
    background: var(--card-bg);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background 0.3s;
}

.copy-btn:hover {
    transform: scale(1.1);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* =========================================
   Strength Meter
========================================= */
.strength-meter {
    margin-bottom: 30px;
    text-align: left;
}

.strength-bar {
    height: 8px;
    width: 0%;
    background-color: var(--text-muted);
    border-radius: 10px;
    transition: width 0.4s ease, background-color 0.4s ease;
    margin-bottom: 5px;
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   Controls (Slider & Checkboxes)
========================================= */
.generator-controls {
    text-align: left;
    margin-bottom: 30px;
}

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

.slider-group label {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-main);
}

.slider-group input[type="range"] {
    width: 100%;
    cursor: pointer;
    accent-color: var(--primary-color);
}

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

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background-color: var(--bg-color);
    border: 2px solid var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✔';
    color: white;
    font-size: 16px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
}

/* =========================================
   Action Button
========================================= */
.action-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    transition: transform 0.2s, background 0.3s;
}

.action-btn:hover {
    background-color: #324edb;
    transform: translateY(-3px);
}

/* =========================================
   SEO Content & FAQ
========================================= */
.content-section {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: background-color 0.3s ease;
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.content-section p, .content-section ol {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.content-section ol {
    padding-left: 20px;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(141, 153, 174, 0.2);
    padding-bottom: 15px;
}

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

.faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

footer {
    text-align: center;
    padding: 30px 5%;
    margin-top: 20px;
    color: var(--text-muted);
}

/* =========================================
   Mobile Responsiveness
========================================= */
@media (max-width: 600px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    #password-result {
        font-size: 1.2rem;
    }
}