/* ===================================================
   TAPSO - Base Styles (Shared across all pages)
   =================================================== */

/* Base Reset & Typography */
body {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

.dark ::-webkit-scrollbar-thumb {
    background: #3f3f46;
}

    .dark ::-webkit-scrollbar-thumb:hover {
        background: #52525b;
    }

/* Custom Scrollbar Hide */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .scrollbar-hide::-webkit-scrollbar {
        display: none;
    }

/* No Scrollbar Utility */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .no-scrollbar::-webkit-scrollbar {
        display: none;
    }

/* Custom Scrollbar Thin */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

    .custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

/* Focus States */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Form Element Base Styles */
input, textarea, select {
    font-family: inherit;
}

    input::placeholder,
    textarea::placeholder {
        color: var(--text-muted);
    }

/* Button Base */
button {
    font-family: inherit;
    cursor: pointer;
}

    button:disabled {
        cursor: not-allowed;
        opacity: 0.5;
    }

/* Link Base */
a {
    text-decoration: none;
    color: inherit;
}

/* Selection */
::selection {
    background-color: var(--primary);
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-5%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn var(--transition-slow) ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight var(--transition-slow) ease-out;
}

/* Utility Classes */
.dir-ltr {
    direction: ltr;
}

.dir-rtl {
    direction: rtl;
}

/* Material Symbols Filled */
.material-symbols-outlined.fill-1,
.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effect */
.card-hover {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

    .card-hover:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dark .glass {
    background: rgba(30, 26, 46, 0.8);
}

/* Line Clamp Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.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;
}

/* Icon Container */
.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Responsive Hide/Show */
@media (max-width: 640px) {
    .sm-hide {
        display: none !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .md-hide {
        display: none !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .lg-hide {
        display: none !important;
    }
}

@media (min-width: 1025px) {
    .xl-hide {
        display: none !important;
    }
}
