/* Global font application for PULSE Web */
@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

/* Apply Rubik font to everything */
*, *::before, *::after {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 500 !important;
    background: #0a0a0f;
    color: #ffffff;
}

/* Ensure canvas text rendering uses the font */
canvas {
    font-family: 'Rubik', sans-serif !important;
}

/* Compose Multiplatform canvas container */
#ComposeTarget, .compose-target {
    font-family: 'Rubik', sans-serif !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Remove default focus outlines and apply custom ones */
*:focus {
    outline: none;
}

/* Disable text selection on UI elements */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Loading animation styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0f1a 100%);
}

.loading-text {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    letter-spacing: 0.5px;
    font-weight: 500 !important;
}

/* Smooth transitions for interactive elements */
button, a, input, select, textarea {
    transition: all 0.2s ease;
}

/* Prevent iOS Safari zoom on input focus */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Hide loading spinner once app loads */
body.app-loaded .loading-container > svg,
body.app-loaded .loading-container > .loading-text {
    display: none;
}