@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #9D0A4E; /* Omezol Magenta */
    --secondary-color: #00A651; /* Vibrant Green */
    --accent-blue: #0054A6;
    --accent-orange: #F7941D;
    --bg-color: #F8F9FA;
    --text-dark: #1A1A1A;
    --text-muted: #6C757D;
    --white: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 8px 32px 0 rgba(157, 10, 78, 0.1);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    height: 100vh;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    height: 100%;
    position: relative;
    background: var(--white);
    box-shadow: 0 0 50px rgba(0,0,0,0.1);
    overflow: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 90px; /* Space for footer */
    display: none;
    background: var(--white);
    z-index: 10;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

/* Splash Screen */
#splash-screen {
    z-index: 1000;
    display: none; /* Hidden by default */
}

#splash-screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--white);
}

.splash-logo {
    width: 200px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Auth Screens */
.auth-container {
    padding-top: 60px;
    text-align: center;
}

.auth-logo {
    width: 120px;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

input {
    width: 100%;
    padding: 15px;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(157, 10, 78, 0.1);
}

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:active {
    transform: scale(0.98);
}

.auth-links {
    margin-top: 20px;
    color: var(--text-muted);
}

.auth-links span {
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
}

/* Dashboard */
.dashboard-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 30px 20px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    margin-bottom: 30px;
}

.welcome-text {
    font-size: 14px;
    opacity: 0.8;
}

.doctor-name {
    font-size: 24px;
    font-weight: 700;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding-bottom: 20px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid #F0F0F0;
}

.feature-card:active {
    transform: translateY(5px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(157, 10, 78, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--primary-color);
    font-size: 24px;
}

.feature-title {
    font-weight: 700;
    font-size: 14px;
}

/* Footer Navigation */
.footer-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #EEE;
    padding: 0 10px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

/* Gastro AI Chat */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100% - 10px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
}

.message.ai {
    background: #F1F1F1;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: var(--primary-color);
    color: var(--white);
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 15px 0;
}

.chat-input {
    flex: 1;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #EEE;
}

/* Journal/Articles */
.article-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    border: 1px solid #F0F0F0;
}

.article-img {
    width: 100%;
    height: 140px;
    background: #EEE;
    object-fit: cover;
}

.article-content {
    padding: 15px;
}

.article-tag {
    font-size: 10px;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
}

.article-title {
    font-size: 16px;
    font-weight: 700;
    margin: 5px 0;
}

/* Leaderboard */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #F0F0F0;
}

.rank {
    width: 30px;
    font-weight: 700;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #EEE;
    margin-right: 15px;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 600;
}

.score {
    color: var(--primary-color);
    font-weight: 700;
}

/* Quiz & Multiplayer Additions */
.quiz-option {
    background: var(--white);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #EEE;
    transition: var(--transition);
    cursor: pointer;
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background: rgba(157, 10, 78, 0.05);
}

.quiz-option.correct {
    background: #E8F5E9;
    border-color: #4CAF50;
    color: #2E7D32;
}

.quiz-option.wrong {
    background: #FFEBEE;
    border-color: #EF5350;
    color: #C62828;
}

.matching-loader {
    width: 60px;
    height: 60px;
    border: 5px solid #F3F3F3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.pulse-msg {
    animation: textPulse 1.5s infinite;
}

@keyframes textPulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

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