/* MenuApp/assets/css/main.css */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-sub: #64748b;
    --border-color: #f1f5f9;
    --input-bg: #f8fafc;
    --input-border: #e2e8f0;
    --shadow-soft: rgba(0, 0, 0, 0.05);
    --shadow-card: rgba(0, 0, 0, 0.08);
    --accent-soup: #f59e0b;
    --accent-main: #ef4444;
    --accent-side: #10b981;
    --accent-dessert: #8b5cf6;
}

[data-theme="dark"] {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg: #0f172a;
    --surface: #1e293b;
    --text-main: #f1f5f9;
    --text-sub: #94a3b8;
    --border-color: #334155;
    --input-bg: #0f172a;
    --input-border: #334155;
    --shadow-soft: rgba(0, 0, 0, 0.2);
    --shadow-card: rgba(0, 0, 0, 0.4);
}

body.disable-anim * {
    transition: none !important;
    animation: none !important;
}

/* APP LAYOUT */
html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: fixed;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    margin: 0;
    color: var(--text-main);
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.fixed-top-area {
    flex-shrink: 0;
    width: 100%;
    z-index: 50;
    background-color: var(--bg);
    transition: background-color 0.3s ease;
}

.scrollable-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 20px;
}

/* HEADER */
.app-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 25px 25px 60px 25px;
    border-bottom-left-radius: 35px;
    border-bottom-right-radius: 35px;
    color: white;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
    position: relative;
    z-index: 10;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: env(safe-area-inset-top);
}

.user-greeting h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-greeting p {
    margin: 0 0 5px 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.uni-logo {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    color: white;
}

.footer-info {
    text-align: center;
    font-size: 11px;
    color: var(--text-sub);
    padding: 30px 0 10px 0;
    opacity: 0.6;
}

/* GLOBAL ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideNextOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

@keyframes slideNextIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slidePrevOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

@keyframes slidePrevIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.skeleton {
    background: #cbd5e1;
    border-radius: 8px;
    animation: pulse 1.5s infinite;
}

[data-theme="dark"] .skeleton {
    background: #334155;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

@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);
    }
}