/* Custom styles for Encrypted ID Manager */

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.2s ease-in-out;
}

/* Custom scrollbar for admin list */
#adminList::-webkit-scrollbar {
    width: 6px;
}

#adminList::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

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

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

/* Enhanced focus states for better accessibility */
button:focus,
input:focus {
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

/* Hover effects for interactive elements */
.hover-lift:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Animation for toast notifications */
#toast {
    animation: slideIn 0.3s ease-out;
}

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

/* Modal backdrop animation */
#adminModal {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Code block styling enhancements */
code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    letter-spacing: 0.5px;
}

/* Button hover states */
button:hover {
    transform: translateY(-1px);
}

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

/* Input field enhancements */
input[type="text"],
input[type="password"] {
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 1px #6b7280;
}

/* Section card hover effects */
section {
    transition: box-shadow 0.2s, transform 0.2s;
}

section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* Icon animations */
.fa-magic {
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-5deg) scale(1.05);
    }
    75% {
        transform: rotate(5deg) scale(1.05);
    }
}

/* Loading state for buttons */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive design improvements */
@media (max-width: 640px) {
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    section {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    #adminModal .sm\\:max-w-4xl {
        max-width: calc(100vw - 2rem);
        margin: 1rem;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here if needed */
}

/* Print styles */
@media print {
    #adminBtn,
    button,
    #toast {
        display: none !important;
    }
    
    section {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}
