/*
StudyRive AI - Custom Stylesheet
*/

:root {
    --color-bg-dark: #0D1117;      /* Deep, dark background, almost black */
    --color-bg-medium: #161B22;   /* Slightly lighter background for cards/modals */
    --color-border: #30363d;      /* Subtle border color */
    
    --color-text-primary: #c9d1d9; /* Main text color, off-white */
    --color-text-secondary: #8b949e;/* Secondary text, for subtitles or less important info */

    --color-accent-teal: #39d39f;  /* A bright, vibrant teal for primary actions */
    --color-accent-blue: #58a6ff;  /* A calming blue for secondary accents */
    --color-accent-purple: #bc8cff;/* A soft purple for highlights */

    --font-primary: 'Inter', sans-serif; /* Sets the primary font for the app */
}

/* -------------------------------------------------
2. Global & Body Styles
-------------------------------------------------
*/
body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased; /* Smoother fonts on WebKit browsers */
    -moz-osx-font-smoothing: grayscale; /* Smoother fonts on Firefox */
}

/* -------------------------------------------------
3. Custom Component Styles
-------------------------------------------------
These are custom classes we can apply to elements
to give them our special theme styling.
*/

/* --- Gradient Button --- */
/* A reusable class for our main call-to-action buttons */
.btn-gradient {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    color: white;
    background-image: linear-gradient(45deg, var(--color-accent-teal), var(--color-accent-blue));
    background-size: 200% auto;
    transition: background-position 0.5s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-gradient:hover {
    background-position: right center; /* Change gradient direction on hover */
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(57, 211, 159, 0.2); /* Glowing effect */
}

/* --- Glassmorphism Card --- */
/* For our note cards and other containers to have a modern look */
.card-glass {
    background-color: rgba(22, 27, 34, 0.6); /* Semi-transparent background */
    backdrop-filter: blur(10px); /* The "glass" effect */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease; /* UPDATED: Smoother transition for all properties */
}

.card-glass:hover {
    transform: translateY(-5px); /* UPDATED: Lift effect on hover */
    border-color: var(--color-accent-teal);
    box-shadow: 0 8px 25px rgba(57, 211, 159, 0.15); /* UPDATED: Enhanced glow */
}

/* NEW: Added active state for a click effect */
.card-glass:active {
    transform: translateY(-2px); /* Slightly less lift than hover for a "pressing" effect */
    transition-duration: 0.1s;
}


/* --- Gradient Border Input Field --- */
/* Makes our form inputs look sleek */
.input-glow {
    background-color: var(--color-bg-medium);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100%;
    color: var(--color-text-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-glow:focus {
    outline: none;
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
}

/* -------------------------------------------------
4. Utility & Animation Classes
-------------------------------------------------
*/

/* --- Fade-in Animation --- */
/* A simple animation for loading content smoothly */
.fade-in {
    animation: fadeInAnimation 0.5s ease-in-out;
}

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

/* -------------------------------------------------
5. Navbar Styles
------------------------------------------------- */
.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem; /* rounded-md */
    transition: background-color 0.3s ease, color 0.3s ease;
    color: var(--color-text-secondary);
    font-weight: 500;
    text-decoration: none;
}

.nav-link:hover {
    background-color: var(--color-bg-medium);
    color: var(--color-text-primary);
}

/* Special style for the login/signup button */
.nav-link-special {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem; /* rounded-md */
    transition: all 0.3s ease;
    color: var(--color-accent-teal);
    background-color: transparent;
    border: 1px solid var(--color-accent-teal);
    font-weight: 600;
    text-decoration: none;
}

.nav-link-special:hover {
    background-color: var(--color-accent-teal);
    color: var(--color-bg-dark);
}

/* -------------------------------------------------
6. Toast Notification Styles (FIX)
------------------------------------------------- */
#toast-container {
    position: fixed;
    bottom: 1.5rem; /* 24px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* 12px */
    align-items: center;
    width: max-content;
    max-width: 90%;
}

.toast-item {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}


.toast-item.show {
    opacity: 1;
    transform: translateY(0);
}
