/* ==========================================
   iDev Tools - Premium Application Styles
   ========================================== */

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgb(var(--color-primary-400)), rgb(var(--color-primary-600)));
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgb(var(--color-primary-500)), rgb(var(--color-primary-700)));
}

/* Focus Ring with Glow */
.focus-ring {
    outline: none;
}

.focus-ring:focus {
    box-shadow: 0 0 0 2px rgb(var(--color-bg)),
        0 0 0 4px rgb(var(--color-primary-500) / 0.5),
        0 0 20px rgb(var(--color-primary-500) / 0.3);
}

/* Premium Glassmorphism Card */
.glass-card {
    background: linear-gradient(135deg,
            rgba(var(--color-surface), 0.9) 0%,
            rgba(var(--color-surface), 0.7) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgb(var(--color-border) / 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Smooth Transitions */
.transition-theme {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar with gradient border */
.sidebar-transition {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Page Fade Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile sidebar slide-in animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shimmer animation for loading states */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Glow effect for primary elements */
.glow {
    box-shadow: 0 0 20px rgb(var(--color-primary-500) / 0.4),
        0 0 40px rgb(var(--color-primary-500) / 0.2);
}

/* Premium gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg,
            rgb(var(--color-primary-500)) 0%,
            rgb(var(--color-primary-700)) 100%);
}

.gradient-mesh {
    background:
        radial-gradient(at 40% 20%, rgb(var(--color-primary-500) / 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgb(var(--color-primary-400) / 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgb(var(--color-primary-600) / 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 80%, rgb(var(--color-primary-500) / 0.05) 0px, transparent 50%);
}

/* Bible Reader Styles */
.verseContainer {
    padding: 0.25rem 0;
    line-height: 1.8;
    transition: all 0.2s ease;
}

.verseContainer.active {
    background: linear-gradient(90deg,
            rgb(var(--color-primary-100) / 0.6) 0%,
            rgb(var(--color-primary-100) / 0.3) 100%);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem -0.75rem;
    border-left: 3px solid rgb(var(--color-primary-500));
}

.chapternumber {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg,
            rgb(var(--color-primary-500)) 0%,
            rgb(var(--color-primary-700)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    float: left;
    line-height: 1;
    margin-right: 0.5rem;
    margin-top: 0.125rem;
}

.versenumber {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgb(var(--color-primary-500));
    vertical-align: super;
    margin-right: 0.125rem;
    opacity: 0.8;
}

.versetext {
    color: rgb(var(--color-text));
}

/* Premium Tool Card Hover Effect */
.tool-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 100%);
    transition: left 0.5s ease;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgb(var(--color-primary-400) / 0.5);
}

/* Premium button states */
button,
.btn {
    position: relative;
    overflow: hidden;
}

button::after,
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

button:active::after,
.btn:active::after {
    width: 200px;
    height: 200px;
}

/* Number Input Styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Premium input focus states */
input:focus,
textarea:focus,
select:focus {
    border-color: rgb(var(--color-primary-500)) !important;
    box-shadow: 0 0 0 3px rgb(var(--color-primary-500) / 0.15),
        0 0 20px rgb(var(--color-primary-500) / 0.1);
}

/* Floating label effect for stat cards */
.stat-glow {
    position: relative;
}

.stat-glow::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 10%;
    width: 80%;
    height: 20px;
    background: inherit;
    filter: blur(20px);
    opacity: 0.4;
    border-radius: 50%;
}

/* Premium table styling */
table {
    border-collapse: separate;
    border-spacing: 0;
}

table th {
    background: rgb(var(--color-bg-secondary));
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

table tr {
    transition: background 0.15s ease;
}

table tbody tr:hover {
    background: rgb(var(--color-primary-500) / 0.05);
}

/* Premium modal backdrop */
.modal-backdrop {
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.8) 100%);
    backdrop-filter: blur(8px);
}

/* Pulsing dot for status indicators */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg,
            rgb(var(--color-primary-400)) 0%,
            rgb(var(--color-primary-600)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle noise texture overlay */
.noise::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
}