:root {
    /* Light Mode Colors */
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #1c1e21;
    --text-secondary: #65676b;
    --accent-color: #007bff;
    --accent-hover: #0056b3;
    --border-color: #dddfe2;
    --danger: #dc3545;
    --warning: #ffc107;
    --success: #28a745;
    --info: #17a2b8;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-color: #18191a;
    --card-bg: #242526;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --accent-color: #4599ff;
    --accent-hover: #6eb0ff;
    --border-color: #3e4042;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

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

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.theme-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#password-input {
    width: 100%;
    padding: 12px 85px 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#password-input:focus {
    border-color: var(--accent-color);
}

.icon-btn {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: var(--transition);
}

#toggle-visibility {
    right: 45px;
}

#copy-password {
    right: 12px;
}

.icon-btn:hover {
    opacity: 0.7;
}

.char-count {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: right;
}

/* Strength Meter */
.strength-meter {
    margin-bottom: 24px;
}

.meter-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
    background-color: var(--danger);
}

.strength-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Criteria List */
.criteria-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.criteria-list li {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.criteria-list li::before {
    content: '❌';
    font-size: 0.8rem;
}

.criteria-list li.valid {
    color: var(--success);
}

.criteria-list li.valid::before {
    content: '✅';
}

.suggestions {
    background: rgba(23, 162, 184, 0.1);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--info);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Generator Section */
.generator-section h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.generator-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 10px;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-item input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.primary-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.primary-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 10px;
}

/* Responsive */
@media (max-width: 400px) {
    .criteria-list {
        grid-template-columns: 1fr;
    }
}
