/* Public Pages Styles - base2.html */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    scroll-behavior: smooth;
    isolation: isolate;
    background-color: #f8fafc;
    color: #1e293b;
}

/* Animated gradient background */
.gradient-bg {
    background: linear-gradient(-45deg, #0ea5e9, #8b5cf6, #ec4899, #f97316);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glassmorphic elements */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

/* Nav item styles */
.nav-item {
    position: relative;
    transition: color 0.2s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
    transition: width 0.3s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 100%;
    transform: scale(0) translate(-50%, -50%);
    transform-origin: top left;
    opacity: 0;
}

.btn:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(40) translate(-50%, -50%);
        opacity: 0;
    }
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.5);
}

.btn-primary {
    background-color: #7c3aed;
    color: white;
}

.btn-primary:hover {
    background-color: #6d28d9;
}

.btn-primary:active {
    background-color: #5b21b6;
}

.btn-outline {
    border: 1px solid #e5e7eb;
    background-color: transparent;
    color: #374151;
}

.btn-outline:hover {
    background-color: #f9fafb;
}

.btn-gradient {
    background: linear-gradient(45deg, #7c3aed, #4f46e5);
    color: white;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, #6d28d9, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Header styles */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Mobile menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 990;
}

.mobile-menu.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* User dropdown styles */
.avatar-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: #ede9fe;
    color: #7c3aed;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Improved dropdown menu styling */
.dropdown-container {
    position: relative;
    z-index: 100;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    padding-top: 0.5rem;
    z-index: 1050;
    visibility: hidden;
}

.dropdown-menu-inner {
    width: 12rem;
    padding: 0.5rem 0;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown-menu.visible {
    visibility: visible;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    color: #374151;
    font-size: 0.875rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    left: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

@media (min-width: 640px) {
    .toast-container {
        left: auto;
        right: 20px;
        top: 100px;
        max-width: 400px;
    }
}

.toast {
    padding: 12px 16px;
    width: 100%;
    max-width: 100%;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
    pointer-events: auto;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .toast {
        padding: 15px 20px;
        min-width: 280px;
        max-width: 350px;
        transform: translateX(100%);
        font-size: 1rem;
    }
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 640px) {
    .toast.show {
        transform: translateX(0);
    }
}

.toast .close-btn {
    margin-left: auto;
    padding: 4px 8px;
    cursor: pointer;
    background: none;
    border: none;
    flex-shrink: 0;
}

/* Footer link styles */
.footer-link {
    color: #9ca3af;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.footer-link:hover {
    color: white;
    padding-left: 5px;
}

.footer-link::before {
    content: '';
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
    margin-right: 0;
    transition: all 0.2s ease;
}

.footer-link:hover::before {
    width: 10px;
    margin-right: 8px;
}

/* Focus ring utility */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.5);
    border-radius: 0.25rem;
}

/* Keep scroll-to-top button circular on focus */
#scrollToTopBtn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.5);
    border-radius: 9999px;
}
