/* ===== Layout Improvements ===== */

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 30px;
}

/* Card feel for sections */
.control-group,
.options-grid,
.advanced-options {
    background: #ffffff;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Labels */
.control-group label {
    font-weight: 600;
    color: #1e293b;
}

/* ===== Presets ===== */

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.preset-btn {
    padding: 10px;
    font-size: 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #334155;
}

.preset-btn:hover {
    background: #eef2ff;
    border-color: #6366f1;
    color: #4338ca;
}

/* ===== Options ===== */

.options-grid,
.advanced-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #334155;
}

.option-item input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ===== Button ===== */

.action-buttons {
    display: flex;
    justify-content: center;
}

.btn-primary {
    padding: 14px 28px;
    font-size: 15px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79,70,229,0.25);
}

/* ===== RESULT SECTION ===== */

.result-section {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

/* FIXED BIG ISSUE HERE */
.password-display-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap; /* important */
}

/* RESPONSIVE PASSWORD BOX */
.password-display {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 600;
    background: #0f172a;
    color: #e2e8f0;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #1e293b;
    flex: 1;
    min-width: 0; /* critical for mobile */
    word-break: break-word;
    text-align: left;
}

/* Copy button */
.btn-copy {
    padding: 12px 18px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.btn-copy:hover {
    background: #4338ca;
}

/* ===== Strength ===== */

.strength-checker {
    max-width: 500px;
    margin: 0 auto;
}

.strength-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: #64748b;
}

.strength-bar-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s, background-color 0.3s;
}

/* ===== MOBILE FIXES ===== */

@media (max-width: 600px) {

    .password-display-container {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-copy {
        width: 100%;
    }

    .btn-primary {
        width: 100%;
    }

    .preset-buttons {
        grid-template-columns: 1fr;
    }
}