/* Reset existing styles */
.password-generator {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

/* Tab Navigation */
.tool-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 25px;
}

.tab-button {
    padding: 12px 20px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: bold;
    color: #6c757d;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-button:hover {
    color: #495057;
    background-color: #f8f9fa;
}

.tab-button.active {
    color: #2196F3;
    border-bottom-color: #2196F3;
}

/* Tab Content */
.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Password Display */
.password-display {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    position: relative;
}

#password-output {
    flex: 1;
    min-width: 300px;
    padding: 12px 15px;
    font-family: monospace;
    font-size: 16px;
    background-color: #fff;
    border: 2px solid #ced4da;
    border-radius: 4px;
    color: #212529;
}

.password-actions {
    display: flex;
    gap: 5px;
}

.action-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 4px;
    color: #495057;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.action-button:hover {
    background-color: #e9ecef;
    color: #212529;
}

.action-button-text {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 4px;
    color: #495057;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.action-button-text:hover {
    background-color: #e9ecef;
    color: #212529;
}

.copy-button, .generate-button {
    padding: 12px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.copy-button {
    background-color: #6c757d;
    color: white;
}

.copy-button:hover {
    background-color: #5a6268;
}

.generate-button {
    background-color: #28a745;
    color: white;
}

.generate-button:hover {
    background-color: #218838;
}

/* Password Options */
.password-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.options-column {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.option-group {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #dee2e6;
}

.option-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #495057;
}

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

#password-length {
    flex: 1;
    max-width: 300px;
}

#length-value {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Password Strength */
.password-strength {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #dee2e6;
}

.password-strength label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #495057;
}

.strength-meter {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

#strength-bar {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s, background-color 0.3s;
}

#strength-text {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
}

.strength-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 12px;
    color: #6c757d;
}

.detail-value {
    font-weight: bold;
    color: #212529;
}

/* Security Note */
.security-note {
    display: flex;
    gap: 15px;
    align-items: center;
    background-color: #f8f9fa;
    border-left: 4px solid #28a745;
    padding: 15px;
    border-radius: 0 4px 4px 0;
    margin-top: 20px;
}

.lock-icon {
    font-size: 24px;
    color: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.note-content h3 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #212529;
}

.note-content p {
    margin: 0;
    color: #495057;
}

/* History Tab */
.history-container {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 20px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.history-header h2 {
    margin: 0;
    color: #212529;
}

/* .history-actions is duplicated, ensure using the one within .history-header or globally if intended */
/* For instance, if it's specifically for .history-header */
.history-header .history-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}


.history-info {
    position: relative;
    color: #6c757d;
    cursor: pointer;
}

.info-tooltip {
    position: absolute;
    width: 250px;
    background-color: #343a40;
    color: #fff;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    top: 100%;
    right: 0;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.history-info:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
}

.history-list {
    min-height: 200px;
}

.empty-history {
    text-align: center;
    color: #6c757d;
    padding: 40px 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 10px;
}

.history-password {
    font-family: monospace;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-meta {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Actions for individual history items */
.history-item .history-actions {
    display: flex;
    gap: 10px;
}


/* Custom Patterns Tab */
.patterns-container {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 20px;
}

.pattern-legend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-item code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.pattern-input {
    margin-bottom: 20px;
}

.pattern-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.pattern-input input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: monospace;
    margin-bottom: 10px;
}

.pattern-presets {
    margin-top: 30px;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preset-button {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-button:hover {
    background-color: #e9ecef;
}

/* Secure Share Tab */
.share-container {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 20px;
}

.share-input {
    margin-bottom: 20px;
}

.share-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.share-input input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: monospace;
    margin-bottom: 10px;
}

.share-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.option-item {
    flex: 1;
    min-width: 200px;
}

.option-item label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.option-item select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.share-actions {
    margin-bottom: 30px;
}

.share-result {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.result-title {
    font-weight: bold;
    margin-bottom: 15px;
}

.result-link-container {
    display: flex;
    margin-bottom: 15px;
}

.result-link-container input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px 0 0 4px;
    font-family: monospace;
}

.result-link-container button {
    border-radius: 0 4px 4px 0;
}

.result-info p {
    margin: 0;
    font-size: 14px;
    color: #495057;
}

.share-secure-note {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background-color: #f8f9fa;
    border-left: 4px solid #2196F3;
    padding: 15px;
    border-radius: 0 4px 4px 0;
    margin-top: 30px;
}

.note-icon {
    font-size: 24px;
    color: #2196F3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .password-display {
        flex-direction: column;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .strength-details {
        grid-template-columns: 1fr;
    }
    
    .pattern-legend {
        grid-template-columns: 1fr;
    }
    
    .tab-button {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .tool-tabs {
        padding-bottom: 1px;
    }
    
    .share-options {
        flex-direction: column;
        gap: 15px;
    }
}

.information-section {
    margin-top: 50px;
}

.two-column {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 25px 0;
}

.column {
    flex: 1;
    min-width: 300px;
}

.check-list, .x-list {
    padding-left: 25px;
    list-style: none;
}

.check-list li {
    position: relative;
    margin-bottom: 10px;
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: -25px;
    color: #28a745;
    font-weight: bold;
}

.x-list li {
    position: relative;
    margin-bottom: 10px;
}

.x-list li::before {
    content: '✗';
    position: absolute;
    left: -25px;
    color: #dc3545;
    font-weight: bold;
}

.management-options {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 25px 0;
}

.option-card {
    flex: 1;
    min-width: 300px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #dee2e6;
}

.option-icon {
    font-size: 24px;
    margin-bottom: 15px;
    color: #007bff;
}

.option-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #212529;
}

.option-card p {
    margin-bottom: 20px;
    color: #495057;
}

.pros-cons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.pros, .cons {
    flex: 1;
    min-width: 120px;
}

.pros h4 {
    color: #28a745;
    margin-top: 0;
    margin-bottom: 10px;
}

.cons h4 {
    color: #dc3545;
    margin-top: 0;
    margin-bottom: 10px;
}

.pros ul, .cons ul {
    padding-left: 20px;
    margin: 0;
}

.alert-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin: 30px 0;
    border-radius: 0 4px 4px 0;
}

.alert-box h3 {
    margin-top: 0;
    color: #856404;
}

.alert-box p {
    margin-bottom: 0;
    color: #533f03;
}

.password-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}

.password-table th, .password-table td {
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: left;
}

.password-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.password-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table-note {
    font-size: 14px;
    font-style: italic;
    color: #6c757d;
} 