/**
 * Premium WebTools - Password Generator
 * Main styles for the Password Generator tool
 */

/* Tool Header Styles */
.tool-header {
    background: linear-gradient(135deg, #1a3a5f 0%, #0d1e2f 100%);
    color: #fff;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 4px solid #D4AF37;
    text-align: center;
}

.tool-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #D4AF37);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.tool-description {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Generator Container */
.generator-container {
    max-width: 900px;
    margin: 0 auto 3rem;
}

/* Password Output Section */
.password-output-section {
    background: linear-gradient(135deg, #1a3a5f 0%, #0d1e2f 100%);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-left: 6px solid #D4AF37;
    color: #fff;
}

.password-display {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.password-display input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
    background-color: rgba(255, 255, 255, 0.1);
    color: #D4AF37;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    margin-right: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 1px;
}

.password-display input:focus {
    outline: none;
    border-color: #D4AF37;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: #D4AF37;
    border: 2px solid rgba(212, 175, 55, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    font-size: 1.1rem;
}

.icon-btn:hover {
    background-color: rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

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

.password-strength {
    margin-top: 1rem;
}

.strength-meter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.strength-segment {
    height: 8px;
    flex: 1;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.strength-segment[data-active="true"][data-strength="1"] {
    background-color: #dc3545;
}

.strength-segment[data-active="true"][data-strength="2"] {
    background-color: #ffc107;
}

.strength-segment[data-active="true"][data-strength="3"] {
    background-color: #28a745;
}

.strength-segment[data-active="true"][data-strength="4"] {
    background-color: #D4AF37;
}

.strength-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

#strengthText {
    font-weight: 600;
}

/* Password Options Section */
.password-options-section {
    background: linear-gradient(to bottom, #f8f9fa, #fff);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(26, 58, 95, 0.1);
}

.option-group {
    margin-bottom: 2rem;
}

.option-header {
    margin-bottom: 1rem;
}

.option-header h3 {
    color: #1a3a5f;
    font-size: 1.3rem;
    margin: 0;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.option-header h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #D4AF37;
}

.option-header label {
    color: #1a3a5f;
    font-size: 1.1rem;
    font-weight: 600;
}

.option-control {
    width: 100%;
}

/* Range Slider Styles */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #1a3a5f, #D4AF37);
    outline: none;
    margin-bottom: 0.5rem;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #D4AF37;
    cursor: pointer;
    border: 2px solid #1a3a5f;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #D4AF37;
    cursor: pointer;
    border: 2px solid #1a3a5f;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
}

/* Checkbox Styles */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #1a3a5f;
    border-radius: 4px;
    margin-right: 0.75rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-item input[type="checkbox"]:checked {
    background-color: #1a3a5f;
    border-color: #1a3a5f;
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '\\2714';
    font-size: 14px;
    color: #D4AF37;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-item input[type="checkbox"]:hover {
    border-color: #D4AF37;
}

.checkbox-item label {
    color: #495057;
    cursor: pointer;
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #1a3a5f 0%, #0d1e2f 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.generate-btn:hover {
    background: linear-gradient(135deg, #0d1e2f 0%, #1a3a5f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
}

.generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.generate-btn i {
    font-size: 1.1rem;
    color: #D4AF37;
}

/* Password History Section */
.password-history-section {
    background: linear-gradient(to right, #1a3a5f, #0d1e2f);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.password-history-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.history-header h3 {
    color: #D4AF37;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.clear-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.clear-btn:hover {
    background-color: rgba(220, 53, 69, 0.2);
    color: #fff;
    border-color: rgba(220, 53, 69, 0.4);
}

.clear-btn i {
    font-size: 0.9rem;
}

.history-list {
    position: relative;
    z-index: 2;
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.history-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.history-password {
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 1px;
}

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

.history-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.history-btn:hover {
    color: #D4AF37;
    background-color: rgba(255, 255, 255, 0.1);
}

.empty-history {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Information Section Styles */
.info-section {
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(26, 58, 95, 0.1);
}

.info-section h2 {
    color: #1a3a5f;
    margin-bottom: 2rem;
    border-bottom: 3px solid #D4AF37;
    padding-bottom: 0.75rem;
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    position: relative;
}

.info-section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60%;
    height: 3px;
    background-color: #1a3a5f;
}

.info-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid #1a3a5f;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-left-color: #D4AF37;
}

.info-card h3 {
    color: #1a3a5f;
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 1.4rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.info-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #D4AF37;
}

.info-card p {
    color: #495057;
    margin-bottom: 1.25rem;
    line-height: 1.6;
    font-size: 1.05rem;
}

.info-card ul {
    padding-left: 1.5rem;
    color: #495057;
    margin-bottom: 1rem;
}

.info-card li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    position: relative;
    padding-left: 0.5rem;
}

.info-card strong {
    color: #1a3a5f;
    font-weight: 700;
}

/* FAQ Section Styles */
.faq-container {
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: linear-gradient(to right, #1a3a5f, #0d1e2f);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.faq-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.faq-container h2 {
    color: #D4AF37;
    margin-bottom: 2rem;
    border-bottom: 3px solid #D4AF37;
    padding-bottom: 0.75rem;
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
}

.faq-container h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60%;
    height: 3px;
    background-color: #fff;
}

.faq-item {
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.faq-item:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.faq-question {
    padding: 1.25rem 1.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}

.faq-toggle {
    color: #D4AF37;
    transition: transform 0.3s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(212, 175, 55, 0.2);
    border-radius: 50%;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.faq-answer.active {
    padding: 1.5rem 1.75rem;
    max-height: 500px;
}

.faq-answer p {
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.faq-toggle i.fa-chevron-up {
    transform: rotate(180deg);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.toast {
    background: linear-gradient(135deg, #1a3a5f 0%, #0d1e2f 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 400px;
    animation: slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.toast.success {
    border-left: 5px solid #D4AF37;
}

.toast.success::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #D4AF37;
    margin-right: 12px;
    font-size: 1.2rem;
}

.toast.error {
    border-left: 5px solid #dc3545;
}

.toast.error::before {
    content: '\f00d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #dc3545;
    margin-right: 12px;
    font-size: 1.2rem;
}

.toast.info {
    border-left: 5px solid #17a2b8;
}

.toast.info::before {
    content: '\f129';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #17a2b8;
    margin-right: 12px;
    font-size: 1.2rem;
}

.toast-content {
    flex: 1;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-size: 1.05rem;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    margin-left: 15px;
    transition: all 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-close:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

@keyframes slide-in {
    from {
        transform: translateX(100%) translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .password-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    .password-display input {
        margin-right: 0;
        margin-bottom: 1rem;
        font-size: 1.2rem;
    }
    
    .password-display .icon-btn {
        margin-left: 0;
        margin-right: 0.5rem;
    }
    
    .password-display .icon-btns {
        display: flex;
        justify-content: flex-end;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .history-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-header h3 {
        margin-bottom: 1rem;
    }
    
    .info-card, .faq-item {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tool-title {
        font-size: 2rem;
    }
    
    .tool-description {
        font-size: 1rem;
    }
    
    .password-output-section, 
    .password-options-section,
    .password-history-section,
    .info-section,
    .faq-container {
        padding: 1.5rem;
    }
}
