:root {
    --primary: #2c3e50;
    --accent: #e74c3c;
    --accent-hover: #c0392b;
    --secondary: #3498db;
    --success: #27ae60;
    --success-hover: #219e50;
    --gray: #95a5a6;
    --light-gray: #ecf0f1;
    --text: #2c3e50;
    --bg-gradient: linear-gradient(135deg, #74ebd5, #9face6);
    --container-bg: white;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    --border-radius: 18px;
    --transition: all 0.3s ease;
    
    --very-weak: #d32f2f;
    --weak: #f57c00;
    --fair: #fbc02d;
    --strong: #689f38;
    --very-strong: #388e3c;
}

body.dark-mode {
    --primary: #ecf0f1;
    --text: #ecf0f1;
    --success: #27ae60;
    --container-bg: #1E123C;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    --bg-gradient: linear-gradient(135deg, #16213e, #0f3460);
}

.password-container {
    max-width: 100%;
    margin: auto;
    background: var(--container-bg);
    border-radius: 0;
    padding: 50px 30px;
    overflow: hidden;
    position: relative;
    transition: background 0.5s;
}

.theme-toggle {
    position: absolute;
    top: 5px;
    right: 35px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.dark-mode .theme-toggle {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle .sun {
    opacity: 1;
}

.theme-toggle .moon {
    opacity: 0.25;
}

body.dark-mode .theme-toggle .sun {
    opacity: 0.25;
}

body.dark-mode .theme-toggle .moon {
    opacity: 1;
}

.password-checker-title-suite{
    color:#e74c3ce6 !important;
}

.password-checker-title{
    color:#ffffff !important;
}

.tool-wrapper {
    width: 100%;
    max-width: 82rem;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
    padding-bottom: 30px;
}

@media (min-width: 1024px) {
    .tool-wrapper {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
}

.controls {
    color: var(--text);
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

@media (min-width: 1024px) {
    .controls {
        grid-column: span 5 / span 5;
    }
}

body.dark-mode .controls {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Password Modes */
.password-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #bdc3c7;
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

body.dark-mode .mode-btn {
    background: #2c2c3e;
    border-color: #555;
}

.mode-btn:hover {
    border-color: var(--accent);
    background: rgba(231, 76, 60, 0.05);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

body.dark-mode .mode-btn.active {
    background: var(--accent);
}

.mode-btn svg {
    flex-shrink: 0;
}

/* Password Modes */
.password-mode {
    display: none;
}

.password-mode.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mode-title {
    font-size: 1.4rem;
    color: var(--text) !important;
    margin-bottom: 8px;
    font-weight: 700;
}

.mode-description {
    color: var(--text);
    opacity: 0.7;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* Input Groups */
.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    padding: 14px 50px 14px 18px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #bdc3c7;
    border-radius: 12px;
    background: white;
    color: var(--text);
    transition: var(--transition);
}

body.dark-mode .password-input {
    background: #2c2c3e;
    border-color: #555;
    color: #fff;
}

.password-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gray);
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--accent);
}

/* Strength Meter */
.strength-meter {
    margin-bottom: 25px;
}

.strength-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

body.dark-mode .strength-bar {
    background: #3a3a4a;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: all 0.4s ease;
    background: #e0e0e0;
}

.strength-text {
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

/* Password Criteria */
.password-criteria {
    background: rgba(0, 0, 0, 0.03);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

body.dark-mode .password-criteria {
    background: rgba(255, 255, 255, 0.05);
}

.password-criteria h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--text) !important;
    font-weight: 600;
}

.criteria-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text);
    font-size: 0.9rem;
    transition: var(--transition);
}

.criteria-icon {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--gray);
}

.criteria-item.met .criteria-icon {
    color: var(--success);
}

.criteria-item.met {
    opacity: 1;
}

.criteria-item:not(.met) {
    opacity: 0.5;
}

/* Password Stats */
.password-stats {
    background: rgba(0, 0, 0, 0.03);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

body.dark-mode .password-stats {
    background: rgba(255, 255, 255, 0.05);
}

.password-stats h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--text) !important;
    font-weight: 600;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--text);
    font-size: 0.9rem;
}

.stat-row strong {
    color: var(--accent);
}

/* Range Input */
.range-input {
    width: calc(100% - 60px);
    margin-right: 10px;
}

.range-value {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--accent);
    font-size: 1rem;
}

/* Checkbox Group */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 16px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.generate-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn.generating {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.98); }
}

/* Generated Password Container */
.generated-password-container {
    background: rgba(0, 0, 0, 0.03);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

body.dark-mode .generated-password-container {
    background: rgba(255, 255, 255, 0.05);
}

.generated-password {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.copy-btn {
    padding: 10px 16px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.copy-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.copy-btn.copied {
    background: var(--success);
}

/* Security Tips */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tip-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    transition: var(--transition);
}

body.dark-mode .tip-item {
    background: rgba(255, 255, 255, 0.05);
}

.tip-item:hover {
    transform: translateX(5px);
    background: rgba(0, 0, 0, 0.06);
}

body.dark-mode .tip-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.tip-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tip-content h4 {
    margin: 0 0 8px 0;
    color: var(--text) !important;
    font-size: 1rem;
    font-weight: 600;
}

.tip-content p {
    margin: 0;
    color: var(--text);
    opacity: 0.8;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Generation History */
.generation-history {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .generation-history {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.generation-history h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text) !important;
    font-weight: 600;
}

#historyList {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

#historyList::-webkit-scrollbar {
    width: 6px;
}

#historyList::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

body.dark-mode #historyList::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#historyList::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.no-history {
    text-align: center;
    padding: 20px;
    color: var(--text);
    opacity: 0.5;
    font-style: italic;
}

.history-item {
    background: rgba(0, 0, 0, 0.03);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s;
    cursor: pointer;
}

body.dark-mode .history-item {
    background: rgba(255, 255, 255, 0.05);
}

.history-item:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateX(5px);
}

body.dark-mode .history-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    opacity: 0.7;
}

.history-time {
    color: var(--text);
}

.history-strength {
    font-weight: 600;
}

.history-strength.very-weak { color: var(--very-weak); }
.history-strength.weak { color: var(--weak); }
.history-strength.fair { color: var(--fair); }
.history-strength.strong { color: var(--strong); }
.history-strength.very-strong { color: var(--very-strong); }

.history-data {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.clear-btn {
    width: 100%;
    padding: 10px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.clear-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Info Display Container */
.info-display-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 1024px) {
    .info-display-container {
        grid-column: span 7 / span 7;
    }
}

/* Preview Section */
.preview-section {
    background: var(--container-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

body.dark-mode .preview-section {
    border-color: rgba(255, 255, 255, 0.1);
}

.preview-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text) !important;
}

/* Score Display */
.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
}

.score-circle {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
}

.score-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-bg {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 8;
}

body.dark-mode .score-bg {
    stroke: #3a3a4a;
}

.score-progress {
    fill: none;
    stroke: var(--gray);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: all 0.6s ease;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text);
}

.score-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

/* Warnings & Suggestions */
.warnings-section,
.suggestions-section {
    background: rgba(0, 0, 0, 0.03);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

body.dark-mode .warnings-section,
body.dark-mode .suggestions-section {
    background: rgba(255, 255, 255, 0.05);
}

.warnings-section h4,
.suggestions-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text) !important;
    font-weight: 600;
}

.warnings-section ul,
.suggestions-section ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text);
}

.warnings-section li {
    margin-bottom: 8px;
    color: var(--accent);
}

.suggestions-section li {
    margin-bottom: 8px;
    color: var(--secondary);
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--container-bg);
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-align: left;
    border: 1px solid #e5e7eb;
}

body.dark-mode .step {
    border-color: rgba(255, 255, 255, 0.1);
}

.step:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #d70932;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.step p {
    margin: 0;
    font-size: 13px;
    color: var(--text);
}

.steps-grid-mobile {
    display: none;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.info-card {
    background: var(--container-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

body.dark-mode .info-card {
    border-color: rgba(255, 255, 255, 0.1);
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text) !important;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text);
    line-height: 1.6;
}

.info-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.info-card li strong {
    color: var(--accent);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .password-container {
        padding: 50px 0;
    }

    .controls {
        margin-top: 0;
        border: none !important;
        box-shadow: none !important;
    }

    .tool-wrapper {
        width: 95%;
        gap: 0 !important;
    }

    .password-modes {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .mode-btn {
        padding: 10px 8px;
        font-size: 0.75rem;
    }

    .steps-grid {
        display: none;
    }

    .steps-grid-mobile {
        display: block !important;
        padding-bottom: 50px;
    }

    .steps-grid-mobile .step {
        margin-bottom: 16px;
    }

    .info-section {
        padding: 0 10px;
    }

    .score-circle {
        width: 150px;
        height: 150px;
    }

    .score-value {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .mode-btn {
        font-size: 0.7rem;
        padding: 8px 4px;
        gap: 4px;
    }

    .mode-btn svg {
        width: 16px;
        height: 16px;
    }

    .generated-password-container {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
    }
}