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

body {
    font-family: 'Inter', sans-serif;
    overscroll-behavior: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.card-shadow {
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.3);
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

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

::-webkit-scrollbar-thumb {
    background-color: #7c3626;
    border-radius: 2px;
}

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

/* Pie Chart Animations */
.pie-slice {
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    transform-origin: center;
}

.pie-slice:active {
    opacity: 0.8;
}

.pie-slice.selected {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5));
    z-index: 10;
}

.add-btn-slice {
    cursor: pointer;
    transition: transform 0.2s;
    transform-origin: center;
}

.add-btn-slice:active {
    transform: scale(0.95);
}

/* Passcode dots */
.passcode-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #f7b538;
    transition: background-color 0.2s;
}

.passcode-dot.filled {
    background-color: #f7b538;
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Nav Bar Styles */
.nav-btn {
    transition: color 0.2s, transform 0.1s;
}

.nav-btn.active {
    color: #f7b538;
}

.nav-btn.inactive {
    color: #f5853f;
    opacity: 0.6;
}

/* Bar Chart Styles */
.bar-container {
    display: flex;
    align-items: flex-end;
    height: 200px;
    gap: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid #7c3626;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease-out;
    min-height: 4px;
}

.bar-label {
    font-size: 10px;
    color: #f5853f;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Update Notification */
#update-notification {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

#update-notification.show {
    transform: translateY(0);
}

/* Fluid Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}