/* StudyAll - Main Styles */

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

/* Base Styles - Using semantic theme variables */

.cherry-blossom .card h1,
.cherry-blossom .card h2,
.cherry-blossom .card h3,
.cherry-blossom .card h4,
.cherry-blossom .card h5,
.cherry-blossom .card h6 {
    color: #FFFFFF !important;
}

.cherry-blossom .card p,
.cherry-blossom .card span:not(.progress-fill),
.cherry-blossom .card div {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Force white text for all styled text elements in cards */
.cherry-blossom .card [style*="color: var(--text-primary)"] {
    color: #FFFFFF !important;
}

.cherry-blossom .card [style*="color: var(--text-secondary)"] {
    color: rgba(255, 255, 255, 0.85) !important;
}

.cherry-blossom .card [style*="color: var(--text-tertiary)"] {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Exceptions - keep dark text on light backgrounds */
.cherry-blossom .card [style*="background-color: #FFFFFF"],
.cherry-blossom .card [style*="background-color: var(--bg-tertiary)"],
.cherry-blossom .card [style*="background-color: var(--accent-light)"],
.cherry-blossom .card [style*="background-color: var(--bg-primary)"] {
    color: var(--text-primary) !important;
}

.cherry-blossom .card [style*="background-color: #FFFFFF"] [style*="color"],
.cherry-blossom .card [style*="background-color: var(--bg-tertiary)"] [style*="color"],
.cherry-blossom .card [style*="background-color: var(--accent-light)"] [style*="color"] {
    color: var(--text-primary) !important;
}

/* Matcha sidebar text overrides */
.matcha #sidebar {
    color: #FFFFFF;
}

.matcha .nav-button {
    color: rgba(255, 255, 255, 0.7);
}

.matcha .nav-button:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.1);
}

.matcha .nav-button.active {
    color: #C67D5A;
    background-color: rgba(198, 125, 90, 0.15);
}

/* Matcha card overrides - ensure text is readable on dark green cards */
.matcha .card {
    background-color: var(--bg-secondary);
    color: #FFFFFF !important;
}

.matcha .card h1,
.matcha .card h2,
.matcha .card h3,
.matcha .card h4,
.matcha .card h5,
.matcha .card h6 {
    color: #FFFFFF !important;
}

.matcha .card p,
.matcha .card span:not(.progress-fill),
.matcha .card div {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Force white text for all styled text elements in cards */
.matcha .card [style*="color: var(--text-primary)"] {
    color: #FFFFFF !important;
}

.matcha .card [style*="color: var(--text-secondary)"] {
    color: rgba(255, 255, 255, 0.8) !important;
}

.matcha .card [style*="color: var(--text-tertiary)"] {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Exceptions - keep dark text on light backgrounds */
.matcha .card [style*="background-color: #FFFFFF"],
.matcha .card [style*="background-color: var(--bg-tertiary)"],
.matcha .card [style*="background-color: var(--accent-light)"],
.matcha .card [style*="background-color: var(--bg-primary)"] {
    color: var(--text-primary) !important;
}

.matcha .card [style*="background-color: #FFFFFF"] [style*="color"],
.matcha .card [style*="background-color: var(--bg-tertiary)"] [style*="color"],
.matcha .card [style*="background-color: var(--accent-light)"] [style*="color"] {
    color: var(--text-primary) !important;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

/* Links and buttons */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    transition: all 0.2s;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Utility classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.spin {
    animation: spin 1s linear infinite;
}

/* Layout */
#app {
    display: flex;
    height: calc(100vh - 32px);
    overflow: hidden;
}

#main-content {
    flex: 1;
    overflow-y: auto;
    background-color: var(--bg-primary);
    width: 100%;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background-color: var(--accent-primary);
    color: white;
}