/* General Body and Container Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 600px;
    width: 90%;
    box-sizing: border-box;
}

/* Header and Tab Menu Styles */
header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    color: #007bff;
}

.tab-menu {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    flex-grow: 1;
    text-align: center;
    padding: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #6c757d;
    transition: color 0.3s, background-color 0.3s;
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    font-weight: 600;
}

.tab-button:hover:not(.active) {
    color: #343a40;
}

.tab-content.hidden {
    display: none;
}

/* Tool Section Styles */
.tool-section {
    padding: 10px 0;
}

.tool-description {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

/* Input Fields and Buttons */
.input-group, .output-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

input[type="password"],
input[type="text"],
input[type="number"] {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.main-btn, .icon-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.main-btn {
    width: 100%;
    background-color: #28a745;
    color: #fff;
    margin-top: 20px;
}

.main-btn:hover {
    background-color: #218838;
}

.icon-btn {
    background-color: #6c757d;
    color: #fff;
}

.icon-btn:hover {
    background-color: #5a6268;
}

/* Strength Indicator */
.strength-indicator {
    height: 8px;
    width: 100%;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.strength-indicator.weak { background-color: #dc3545; }
.strength-indicator.medium { background-color: #ffc107; }
.strength-indicator.strong { background-color: #28a745; }
.strength-indicator.verystrong { background-color: #007bff; }

/* Feedback Messages */
.feedback-messages {
    margin-top: 15px;
    min-height: 20px;
    text-align: left;
    padding: 0 10px;
}

.feedback-messages p {
    margin-bottom: 5px;
    color: #495057;
}

/* Generator Controls */
.generator-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-row label {
    color: #495057;
}

#lengthInput {
    width: 80px;
    text-align: center;
}

.checkbox-group {
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    .tab-button {
        font-size: 1rem;
        padding: 12px;
    }

    .input-group, .output-group {
        flex-direction: column;
        gap: 10px;
    }

    input[type="password"],
    input[type="text"] {
        width: 100%;
    }
    
    .icon-btn {
        width: 100%;
    }
    
    .control-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}