@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
        
* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background: linear-gradient(135deg, #dc2626 0%, #d2691e 50%, #ea580c 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    padding: 10px;
}
.container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 390px;
    position: relative; 
}
h2 {
    text-align: center;
    color: #1f2937;
    font-size: 1.4rem;
    margin-top: 5px;
    margin-bottom: 2px;
}
.subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.theme-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    transition: transform 0.2s, background-color 0.3s;
}
.theme-toggle:hover {
    background: #e5e7eb;
}
.theme-toggle:active {
    transform: scale(0.85);
}

.result-container {
    background-color: #f3f4f6;
    border: 2px dashed #d1d5db;
    color: #111827;
    padding: 10px 15px;
    font-size: 1.2rem;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    border-radius: 8px;
    word-wrap: break-word;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}
#result {
    max-width: 75%;
    overflow-x: auto;
}
.btn-copy {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s;
    font-weight: 500;
}
.btn-copy:hover {
    background-color: #2563eb;
}

.strength-msg {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.weak { background-color: #ffe4e6; color: #e11d48; border: 1px solid #fda4af; }
.moderate { background-color: #fef08a; color: #b45309; border: 1px solid #fde047; }
.strong { background-color: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.very-strong { background-color: #d1fae5; color: #047857; border: 1px solid #6ee7b7; }

.length-section { display: flex; flex-direction: column; margin: 8px 0; }
.setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
    font-weight: 500;
    color: #4b5563;
    font-size: 0.9rem;
}
.setting input[type="number"] {
    width: 60px;
    padding: 4px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
    outline: none;
    background: #ffffff;
    color: #111827;
}
.length-section input[type="range"] {
    width: 100%;
    margin-top: 5px;
    cursor: pointer;
    accent-color: #3b82f6;
}
.setting input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3b82f6;
}
.btn-large {
    width: 100%;
    background: #111827;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    margin-top: 8px;
}
.btn-large:hover { background: #374151; }

#qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
    display: none;
}
#qrcode-container p { font-size: 0.75rem; color: #6b7280; margin-bottom: 5px; }
#qrcode { padding: 6px; background: white; border: 1px solid #e5e7eb; border-radius: 8px; }

.footer {
    text-align: center;
    margin-top: 15px;
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
}
body.dark-mode .container {
    background-color: #374151;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}
body.dark-mode h2 { color: #f3f4f6; }
body.dark-mode .subtitle { color: #d1d5db; }
body.dark-mode .setting { color: #e5e7eb; }
body.dark-mode .result-container {
    background-color: #1f2937;
    color: #60a5fa; 
    border-color: #4b5563;
}
body.dark-mode .setting input[type="number"] {
    background-color: #1f2937;
    border-color: #4b5563;
    color: #e5e7eb;
}
body.dark-mode .btn-large {
    background: #2563eb;
}
body.dark-mode .btn-large:hover { background: #1d4ed8; }
body.dark-mode .footer { color: #d1d5db; }
body.dark-mode .theme-toggle {
    background: #4b5563;
}
body.dark-mode .theme-toggle:hover {
    background: #6b7280;
}