@tailwind base;
@tailwind components;
@tailwind utilities;

body {
    background-color: #f8fafc;
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(147, 51, 234, 0.03) 0px, transparent 50%),
        radial-gradient(at 50% 0%, rgba(245, 158, 11, 0.02) 0px, transparent 40%);
}

.dark body {
    background-color: #09090b;
    background-image: 
        radial-gradient(at 50% 0%, rgba(99, 102, 241, 0.07) 0px, transparent 60%),
        radial-gradient(at 0% 100%, rgba(168, 85, 247, 0.03) 0px, transparent 50%);
}

.bg-grid {
    background-size: 24px 24px;
    background-image: 
        linear-gradient(to right, rgba(15, 23, 42, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
}

/* Premium Light Card */
.gradient-border-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

/* Light Mode Inputs */
.glass-input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: #0f172a;
}
.glass-input:focus {
    border-color: #4f46e5;
    outline: 2px solid rgba(79, 70, 229, 0.2);
    outline-offset: -1px;
}

/* Custom Scrollbars */
textarea::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
textarea::-webkit-scrollbar-track {
    background: transparent;
}
textarea::-webkit-scrollbar-thumb {
    background: #e4e4e7;
    border-radius: 2px;
}
.dark textarea::-webkit-scrollbar-thumb {
    background: #27272a;
}
textarea::-webkit-scrollbar-thumb:hover {
    background: #d4d4d8;
}
.dark textarea::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* Text Generation Transition / Flash Effect */
@keyframes textFlash {
    0% {
        color: #4f46e5;
        transform: scale(1.02);
        opacity: 0.7;
    }
    100% {
        color: #0f172a;
        transform: scale(1);
        opacity: 1;
    }
}
.animate-text-flash {
    animation: textFlash 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: inline-block;
}

/* Copy Tooltip Animation */
@keyframes tooltipFadeUp {
    0% {
        opacity: 0;
        transform: translate(-50%, 6px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -10px) scale(1);
    }
}
.copy-tooltip {
    position: absolute;
    background: #0f172a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
    border: 1px solid #334155;
    animation: tooltipFadeUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    z-index: 100;
}
.copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

/* Dynamic Tab Content Transition Classes */
.tab-content {
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab-content-hidden {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    pointer-events: none;
    position: absolute;
    width: 100%;
}
.tab-content-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    position: relative;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
