@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&display=swap');

/* Global Styles */
body {
    font-family: 'IBM Plex Sans Thai', sans-serif;
}

/* Rule Status Colors */
.rule-pass {
    color: #10b981;
}

.rule-fail {
    color: #ef4444;
}

/* Strength Meter Colors */
.strength-weak {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.strength-medium {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.strength-strong {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Input Focus Effects */
input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Button Hover Effects */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: #1f2937;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

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

/* Rule Item Transitions */
.rule-item {
    transition: all 0.3s ease;
}

.rule-item:hover {
    transform: translateX(4px);
    background-color: #f9fafb;
}

/* Strength Bar Animation */
#strengthBar {
    transition: width 0.5s ease, background 0.5s ease;
}

/* Password Input Field */
#passwordInput {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Generated Password Field */
#generatedPassword {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .tooltip .tooltiptext {
        width: 150px;
        margin-left: -75px;
        font-size: 11px;
    }
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Success State */
.success-border {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
}

/* Error State */
.error-border {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

/* Copy Button States */
.copy-success {
    color: #10b981 !important;
}

.copy-success::after {
    content: '✓';
}

/* Disabled State */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:disabled:hover {
    transform: none;
}