/* Usercible - Custom Styles */

/* Base styles */
* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* View transitions */
.view {
    animation: fadeIn 0.3s ease-out;
}

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

/* Navigation active state */
.nav-btn.active {
    background: white;
    color: black;
    transform: scale(1.05);
}

.nav-btn.active .nav-label {
    display: inline;
}

/* Chat message animations */
.chat-message {
    animation: slideIn 0.3s ease-out;
}

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

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

/* Input focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Error states */
.input-error {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
}

/* Result animation */
.result-animate {
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Article content styling */
.article-content ul {
    list-style: none;
    padding: 0;
}

.article-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: black;
    font-weight: 900;
}

.article-content strong {
    color: black;
    font-weight: 700;
}

/* Pull to refresh */
#pull-indicator {
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), transparent);
}

/* Tool card active state */
.tool-card {
    transition: all 0.2s ease;
}

.tool-card:active {
    transform: scale(0.98);
}

/* Splash screen animation */
#splash .animate-pulse {
    animation: pulseScale 1.5s ease-in-out infinite;
}

@keyframes pulseScale {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Prevent text selection on interactive elements */
button,
.card,
.nav-btn {
    user-select: none;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    body {
        overscroll-behavior-y: none;
    }
    
    #app {
        min-height: 100vh;
        min-height: 100dvh;
    }
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success check animation */
.success-check {
    animation: checkPop 0.5s ease-out;
}

@keyframes checkPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* News item hover */
.news-item {
    transition: all 0.2s ease;
}

.news-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Form validation shake */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
