/**
 * Zyntriax Content AI - Custom Styles
 * Extends TailwindCSS with custom animations and effects
 */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: rgba(99, 102, 241, 0.3);
    color: white;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out forwards;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Loading shimmer effect */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Button effects */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Input focus effects */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Platform badges */
.badge-twitter {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.badge-threads {
    background: linear-gradient(135deg, #4a5568, #2d3748);
}

.badge-instagram {
    background: linear-gradient(135deg, #f56040, #c32aa3);
}

/* Status badges */
.status-draft {
    background-color: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.status-scheduled {
    background-color: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.status-posted {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* Content area styling */
.content-preview {
    background: linear-gradient(
        180deg,
        rgba(30, 41, 59, 0.5) 0%,
        rgba(30, 41, 59, 0.8) 100%
    );
    border-radius: 12px;
    padding: 1rem;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Copy button success state */
.copy-success {
    background-color: rgba(34, 197, 94, 0.3) !important;
    border-color: #22c55e !important;
}

/* Line clamp utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom focus ring */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
}

/* Calendar specific styles */
.calendar-row {
    transition: background-color 0.2s ease;
}

.calendar-row:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

/* Modal backdrop */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Toast notification animations */
.toast-enter {
    transform: translateY(0);
    opacity: 1;
}

.toast-exit {
    transform: translateY(100%);
    opacity: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
    
    .stack-mobile {
        flex-direction: column;
    }
}

/* Print styles */
@media print {
    nav,
    footer,
    button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        color-scheme: dark;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom utility classes */
.text-balance {
    text-wrap: balance;
}

.min-h-content {
    min-height: 150px;
}

/* Hashtag styling */
.hashtag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    background-color: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.hashtag:hover {
    background-color: rgba(6, 182, 212, 0.3);
}
