/* Alpine.js x-cloak directive */
[x-cloak] {
    display: none !important;
}

/* Custom scrollbar for dark mode */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #1F2937;
}
::-webkit-scrollbar-thumb {
    background: #4B5563;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

/* Form elements styling */
.form-input {
    @apply bg-dark-100 border-0 rounded-lg px-4 py-3 text-gray-100 font-medium focus:ring-2 focus:ring-primary focus:outline-none transition-all duration-200;
}

.form-select {
    @apply bg-dark-100 border-0 rounded-lg px-4 py-3 text-gray-100 font-medium focus:ring-2 focus:ring-primary focus:outline-none transition-all duration-200;
}

.btn-primary {
    @apply bg-primary hover:bg-blue-700 text-white font-bold py-3 px-6 rounded-lg transition-all duration-200;
}

.btn-secondary {
    @apply bg-dark-100 hover:bg-dark-200 text-white font-bold py-3 px-6 rounded-lg transition-all duration-200;
}

/* Navbar and mobile menu animations */
.navbar-dropdown {
    @apply transition-all duration-300 ease-in-out transform origin-top;
}

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

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Light mode overrides */
html:not(.dark) {
    @apply bg-gray-100 text-gray-900;
}

html:not(.dark) body {
    @apply bg-gray-100 text-gray-900;
}

html:not(.dark) .bg-dark-400 {
    @apply bg-white;
}

html:not(.dark) .bg-dark-300 {
    @apply bg-gray-50;
}

html:not(.dark) .border-gray-800 {
    @apply border-gray-200;
}

html:not(.dark) .text-gray-200,
html:not(.dark) .text-gray-300,
html:not(.dark) .text-gray-400 {
    @apply text-gray-700;
}

html:not(.dark) .hover\:bg-dark-200:hover,
html:not(.dark) .hover\:bg-gray-700:hover {
    @apply hover:bg-gray-200;
}

html:not(.dark) .bg-dark-500 {
    @apply bg-gray-100;
}

/* Trading activity notification popup */
.notification-popup {
    position: fixed;
    z-index: 1000;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    max-width: 350px;
    min-width: 280px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-popup .notification-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.notification-popup .notification-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 12px;
    color: #fff;
}

.notification-popup .notification-title {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    opacity: 0.9;
}

.notification-popup .notification-content {
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.notification-popup .notification-content b {
    font-weight: 700;
    color: #FFD700;
}

.notification-popup .notification-content a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.notification-popup .notification-content a:hover {
    border-bottom-color: #FFD700;
}

.notification-popup .notification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.notification-popup .notification-time {
    font-style: italic;
}

.notification-popup .notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: color 0.2s ease;
}

.notification-popup .notification-close:hover {
    color: #fff;
}

.notification-popup .progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 215, 0, 0.8);
    border-radius: 0 0 12px 12px;
    transition: width linear;
}

html.dark .notification-popup {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 640px) {
    .notification-popup {
        right: 10px;
        bottom: 80px;
        max-width: calc(100vw - 20px);
        min-width: auto;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification-popup.animate-in {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.notification-popup.animate-out {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
