/* Master CSS for IMATRIX Compass */
/* Version: 1.0.0 */
@import 'animations.css';

/* --- Base Styles --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #030712; /* bg-gray-950 */
    color: #f9fafb; /* text-gray-50 */
    -webkit-tap-highlight-color: transparent;
}

/* --- Components: Cards (Glassmorphism) --- */
.card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* --- Components: Forms --- */
.form-input, .form-select {
    background-color: #1f2937; /* bg-gray-800 */
    border-color: #4b5563; /* border-gray-600 */
    color: #d1d5db; /* text-gray-300 */
}

.form-input:focus, .form-select:focus {
    background-color: #111827; /* bg-gray-900 */
    border-color: #f59e0b; /* border-amber-500 */
    outline: none;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.5);
}

.form-input::placeholder {
    color: #6b7280; /* text-gray-500 */
}

.password-toggle {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* --- Components: Navigation --- */
.nav-item.active {
    background-color: #f59e0b;
    color: #111827;
}

/* --- Layout & Views --- */
.view {
    display: none !important;
    animation: fadeIn 0.4s ease-in-out;
}

.view.active {
    display: block !important;
}

.view.active.grid {
    display: grid !important;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.skeleton {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    50% { opacity: .5; }
}

/* --- Utilities --- */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Modals --- */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.journal-modal,
.guided-journal-modal,
.processing-loader-modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
}

.journal-modal {
    z-index: 50;
    background-color: rgba(0,0,0,0.7);
}

.guided-journal-modal {
    z-index: 100;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.processing-loader-modal {
    z-index: 200;
    background-color: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(8px);
}

.guided-journal-modal.active,
.journal-modal.active,
.processing-loader-modal.active {
    display: flex;
}

.guided-journal-modal .step,
.processing-loader-modal .step {
    display: none;
}

.guided-journal-modal .step.active,
.processing-loader-modal .step.active {
    display: block;
}

.guided-journal-modal .step.active,
.processing-loader-modal .step.active {
    display: block;
}

/* --- Blob Character Animation --- */
.blob-character {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.blob-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 50%;
    animation: blob-bounce 3s infinite ease-in-out;
    position: relative;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
    transition: border-radius 0.5s ease, transform 0.2s;
}

.blob-character:hover .blob-body {
    transform: scale(1.05);
}

.blob-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 40%;
}

.blob-eye {
    width: 18%;
    height: 30%;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 0;
    animation: blob-blink 4s infinite;
}

.blob-eye.left { left: 10%; }
.blob-eye.right { right: 10%; }

.blob-mouth {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Expressions */
.blob-face.happy .blob-mouth { width: 40%; height: 25%; border-radius: 0 0 50% 50%; border-bottom: 3px solid #fff; background: transparent; }
.blob-face.neutral .blob-mouth { width: 30%; height: 0; border-bottom: 3px solid #fff; border-radius: 0; }
.blob-face.surprised .blob-mouth { width: 25%; height: 25%; border-radius: 50%; border: 2px solid #fff; background: #fff; }
.blob-face.excited .blob-mouth { width: 50%; height: 35%; border-radius: 0 0 50% 50%; background: #fff; border: none; }
.blob-face.cheeky .blob-mouth { width: 40%; height: 20%; border-radius: 0 0 50% 0; border-bottom: 3px solid #fff; transform: translateX(-50%) rotate(-10deg); }

@keyframes blob-bounce {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translateY(0); }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: translateY(-5px); }
}

@keyframes blob-blink {
    0%, 96%, 100% { transform: scaleY(1); }
    98% { transform: scaleY(0.1); }
}

/* --- Blob Character Animation --- */
.blob-character {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.blob-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 50%;
    animation: blob-bounce 3s infinite ease-in-out;
    position: relative;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
    transition: border-radius 0.5s ease, transform 0.2s;
}

.blob-character:hover .blob-body {
    transform: scale(1.05);
}

.blob-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 40%;
}

.blob-eye {
    width: 18%;
    height: 30%;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 0;
    animation: blob-blink 4s infinite;
}

.blob-eye.left { left: 10%; }
.blob-eye.right { right: 10%; }

.blob-mouth {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Expressions */
.blob-face.happy .blob-mouth { width: 40%; height: 25%; border-radius: 0 0 50% 50%; border-bottom: 3px solid #fff; background: transparent; }
.blob-face.neutral .blob-mouth { width: 30%; height: 0; border-bottom: 3px solid #fff; border-radius: 0; }
.blob-face.surprised .blob-mouth { width: 25%; height: 25%; border-radius: 50%; border: 2px solid #fff; background: #fff; }
.blob-face.excited .blob-mouth { width: 50%; height: 35%; border-radius: 0 0 50% 50%; background: #fff; border: none; }
.blob-face.cheeky .blob-mouth { width: 40%; height: 20%; border-radius: 0 0 50% 0; border-bottom: 3px solid #fff; transform: translateX(-50%) rotate(-10deg); }

@keyframes blob-bounce {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translateY(0); }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: translateY(-5px); }
}

@keyframes blob-blink {
    0%, 96%, 100% { transform: scaleY(1); }
    98% { transform: scaleY(0.1); }
}