/* Password Generator Tool Styles */
.password-generator-tool {
    min-height: 100vh;
    background: white;
    padding: 2rem 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tool-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.tool-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tool-header h1 i {
    margin-right: 1rem;
    color: #2c8462;
}

.tool-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Generator Interface */
.generator-interface {
    margin-bottom: 3rem;
}

.generator-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Section Labels */
.section-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

/* Type Selection */
.type-selection {
    margin-bottom: 2rem;
}

.type-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.type-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.type-tab:hover {
    border-color: #2c8462;
    background: #f0f8f5;
    color: #2c8462;
}

.type-tab.active {
    border-color: #2c8462;
    background: #2c8462;
    color: white;
    box-shadow: 0 4px 15px rgba(44, 132, 98, 0.3);
}

.type-tab i {
    font-size: 1.2rem;
}

/* Configuration Forms */
.config-forms {
    margin-bottom: 2rem;
}

.config-form {
    display: none;
}

.config-form.active {
    display: block;
}

.config-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.config-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.config-input,
.config-select {
    padding: 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
    font-family: inherit;
}

.config-input:focus,
.config-select:focus {
    outline: none;
    border-color: #2c8462;
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 132, 98, 0.1);
}

/* Length Control */
.length-control {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.length-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
}

.length-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2c8462;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(44, 132, 98, 0.3);
}

.length-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2c8462;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(44, 132, 98, 0.3);
}

.length-input {
    width: 80px;
    text-align: center;
}

/* Character Options */
.character-options {
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    background: #f8f9fa;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #2c8462;
    border-color: #2c8462;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Advanced Options */
.advanced-options {
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.advanced-options-header {
    margin-bottom: 1rem;
}

.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.advanced-toggle:hover {
    background: #f0f8f5;
    border-color: #2c8462;
    color: #2c8462;
}

.advanced-toggle .toggle-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.advanced-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.advanced-options-content {
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    max-height: 0;
}

.advanced-options-content.show {
    opacity: 1;
    max-height: 500px;
    padding-top: 1rem;
}

/* Custom Textarea */
.custom-textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
    font-family: monospace;
    resize: vertical;
    min-height: 80px;
}

.custom-textarea:focus {
    outline: none;
    border-color: #2c8462;
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 132, 98, 0.1);
}

.input-hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-hint i {
    color: #2c8462;
}

/* Action Controls */
.action-controls {
    text-align: center;
    margin-bottom: 2rem;
}

.generate-btn {
    background: linear-gradient(135deg, #2c8462 0%, #1e5f47 100%);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(44, 132, 98, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 132, 98, 0.4);
}

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

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.generation-status {
    margin-top: 1rem;
    text-align: center;
}

.generation-status small {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generation-status i {
    color: #2c8462;
}

/* Result Section */
.result-section {
    border-top: 2px solid #f0f0f0;
    padding-top: 2rem;
    animation: slideIn 0.5s ease-out;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #2c8462;
    color: white;
    border-color: #2c8462;
    transform: scale(1.05);
}

/* Passwords List */
.passwords-list {
    margin-bottom: 2rem;
}

.password-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.password-item:hover {
    border-color: #2c8462;
    background: #f0f8f5;
}

.password-text {
    flex: 1;
    font-family: monospace;
    font-size: 1.1rem;
    color: #333;
    word-break: break-all;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.password-actions {
    display: flex;
    gap: 0.5rem;
}

.password-btn {
    background: #2c8462;
    color: white;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-btn:hover {
    background: #1e5f47;
    transform: scale(1.1);
}

.strength-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.strength-bar {
    width: 60px;
    height: 6px;
    background: #e1e5e9;
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-very-weak .strength-fill { width: 20%; background: #dc3545; }
.strength-weak .strength-fill { width: 40%; background: #fd7e14; }
.strength-fair .strength-fill { width: 60%; background: #ffc107; }
.strength-good .strength-fill { width: 80%; background: #20c997; }
.strength-strong .strength-fill { width: 100%; background: #28a745; }
.strength-very-strong .strength-fill { width: 100%; background: #2c8462; }

/* Password Analysis */
.password-analysis {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e1e5e9;
}

.analysis-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.analysis-label {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-value {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: #666;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
}

.loading-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c8462;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Generate Button Loading State */
.generate-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.generate-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Sliding Generation Animation */
.generation-slide {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #2c8462 0%, #1e5f47 100%);
    margin: 1rem 0;
    height: 0;
    opacity: 0;
    transition: all 0.5s ease;
}

.generation-slide.active {
    height: 60px;
    opacity: 1;
}

.generation-slide-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    font-weight: 600;
    gap: 1rem;
}

.generation-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 0 12px 12px;
    width: 0;
    transition: width 1.5s ease;
}

.generation-slide.active .generation-progress {
    width: 100%;
}

/* Slide-in animation for generated passwords */
.password-item {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInPassword 0.4s ease forwards;
}

.password-item:nth-child(1) { animation-delay: 0.1s; }
.password-item:nth-child(2) { animation-delay: 0.2s; }
.password-item:nth-child(3) { animation-delay: 0.3s; }
.password-item:nth-child(4) { animation-delay: 0.4s; }
.password-item:nth-child(5) { animation-delay: 0.5s; }
.password-item:nth-child(6) { animation-delay: 0.6s; }
.password-item:nth-child(7) { animation-delay: 0.7s; }
.password-item:nth-child(8) { animation-delay: 0.8s; }
.password-item:nth-child(9) { animation-delay: 0.9s; }
.password-item:nth-child(10) { animation-delay: 1.0s; }

@keyframes slideInPassword {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Messages */
.error-message,
.success-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Strength Tester */
.strength-tester {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tester-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tester-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e1e5e9;
}

.tester-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.test-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    font-family: monospace;
}

.test-input:focus {
    outline: none;
    border-color: #2c8462;
    box-shadow: 0 0 0 3px rgba(44, 132, 98, 0.1);
}

.toggle-visibility {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-visibility:hover {
    background: #5a6268;
    transform: translateY(-50%) scale(1.1);
}

.strength-result {
    animation: slideIn 0.3s ease-out;
}

.strength-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.strength-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.detail-label {
    font-size: 0.9rem;
    color: #666;
}

.detail-value {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.detail-value.positive {
    color: #28a745;
}

.detail-value.negative {
    color: #dc3545;
}

/* Recent Passwords */
.recent-passwords {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.recent-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.recent-list {
    margin-bottom: 1.5rem;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border: 1px solid #e1e5e9;
}

.recent-item:last-child {
    margin-bottom: 0;
}

.recent-password-info {
    flex: 1;
    margin-right: 1rem;
}

.recent-type {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.recent-password {
    font-size: 0.9rem;
    color: #333;
    font-family: monospace;
    word-break: break-all;
}

.recent-actions {
    display: flex;
    gap: 0.5rem;
}

.recent-action-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.recent-copy-btn {
    background: #007bff;
    color: white;
}

.recent-copy-btn:hover {
    background: #0056b3;
}

.recent-regenerate-btn {
    background: #28a745;
    color: white;
}

.recent-regenerate-btn:hover {
    background: #218838;
}

.clear-history-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-history-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Popular Examples */
.popular-examples {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.popular-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.example-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-item:hover {
    border-color: #2c8462;
    background: #f0f8f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 132, 98, 0.2);
}

.example-icon {
    width: 50px;
    height: 50px;
    background: #2c8462;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.example-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.example-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* SEO Content */
.seo-content {
    max-width: 800px;
    margin: 4rem auto 0;
    padding: 0 1rem;
    color: #333;
    line-height: 1.6;
}

.seo-content h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #2c8462;
    margin-bottom: 1rem;
}

.seo-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 2rem 0 1rem;
}

.seo-content p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.seo-content ul,
.seo-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.seo-content strong {
    color: #2c8462;
    font-weight: 600;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

/* Mobile Touch Improvements */
.password-btn,
.action-btn,
.recent-action-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.password-btn:active,
.action-btn:active,
.recent-action-btn:active {
    transform: scale(0.95);
}

/* Copy Success Animation */
.copy-success {
    animation: copyPulse 0.3s ease;
}

@keyframes copyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Related Tools Section */
.related-tools-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.related-tools-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tools-header h3 i {
    color: #667eea;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.related-tool-link {
    background: #f8fafc;
    color: #667eea;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tool-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.related-tool-link i {
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2.2rem;
    }

    .tool-description {
        font-size: 1rem;
    }

    .generator-card {
        padding: 1.5rem;
    }

    /* Keep 4 tabs in a row on tablets for better space utilization */
    .type-tabs {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }

    .type-tab {
        padding: 0.8rem 0.3rem;
        font-size: 0.85rem;
    }

    .type-tab i {
        font-size: 1.1rem;
    }

    .config-row {
        grid-template-columns: 1fr;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .result-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .password-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .password-actions {
        justify-content: center;
    }

    .password-btn,
    .recent-action-btn {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .strength-details {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .seo-content {
        margin-top: 2rem;
    }

    .seo-content h2 {
        font-size: 1.5rem;
    }

    .seo-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    /* Keep 2 tabs per row on smaller mobile devices */
    .type-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .type-tab {
        padding: 1rem 0.4rem;
        font-size: 0.8rem;
    }

    .type-tab i {
        font-size: 1rem;
    }

    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .related-tool-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .password-generator-tool {
        padding: 1rem 0.5rem;
    }

    .tool-header h1 {
        font-size: 1.8rem;
    }

    .generator-card {
        padding: 1rem;
    }

    /* Still keep 2 tabs per row even on very small screens for better UX */
    .type-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
    }

    .type-tab {
        padding: 0.9rem 0.2rem;
        font-size: 0.75rem;
    }

    .type-tab i {
        font-size: 0.9rem;
    }

    .generate-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .length-control {
        flex-direction: column;
        gap: 0.5rem;
    }

    .length-input {
        width: 100%;
    }
}

/* Additional mobile optimization for very small screens */
@media (max-width: 360px) {
    .type-tab {
        padding: 0.8rem 0.1rem;
        font-size: 0.7rem;
        gap: 0.3rem;
    }

    .type-tab i {
        font-size: 0.85rem;
    }

    .type-tab span {
        line-height: 1.2;
    }

    .related-tools-section {
        padding: 1rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}
