/* 
* Base.css
* Contains essential styles needed on every page:
* - Color definitions
* - Reset and base styles
* - Typography
* - Header and navigation
* - Hero section
* - Footer
* - Common buttons and containers
*/

/* Color Variables */
:root {
    --primary: #7C3AED;  /* purple-600 */
    --primary-light: #9F67FF;  /* purple-500 */
    --primary-dark: #6D28D9;  /* purple-700 */
    --primary-hover: #8B5CF6;  /* purple-400 */
    --bg1: #F5F3FF;  /* purple-50 */
    --text2: #1F2937;  /* gray-800 */
    --text1: #6B7280;  /* gray-500 */
    --bg2: #FFFFFF;
    --bg-gray: #F3F4F6;  /* gray-100 */
    --footer-bg: #1F2937;  /* gray-800 */
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: var(--text2);
    background-color: var(--bg-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background-color: var(--primary);
    color: var(--bg2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo img {
    width: 3rem;
    height: 3rem;
}

.logo span {
    width: 120px;
}

/* Navigation */
nav {
    display: none;
}

nav a {
    color: var(--bg2);
    text-decoration: none;
    text-align: center;
    font-size: 1.2rem;
    align-self: center;
    padding: 0.5rem 1rem;
    position: relative;
    transition: all 0.2s ease-in-out;
}

nav a:hover {
    color: var(--bg1);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--bg2);
    transition: all 0.3s ease-in-out;
}

nav a:hover::after {
    width: 100%;
    left: 0;
}

/* Standard Hero Section */
.hero {
    background-color: var(--primary);
    color: var(--bg2);
    padding: 2rem 1.5rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Common Buttons */
.auth-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.btn-login {
    background-color: var(--primary-light);
    color: var(--bg2);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.btn-login:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-signup {
    background-color: var(--bg2);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.btn-signup:hover {
    background-color: var(--bg1);
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--bg2);
    color: var(--primary);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: var(--primary);
    color: var(--bg2);
    transform: translateY(-1px);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    padding: 0;
    transition: all 0.2s ease-in-out;
}

/* Footer */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--bg2);
    padding: 3rem 1.5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text1);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul a {
    color: var(--text1);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.footer-section ul a:hover {
    color: var(--bg2);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text1);
    font-size: 1.25rem;
    transition: all 0.2s ease-in-out;
}

.social-links a:hover {
    color: var(--primary-light);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: var(--text1);
}

/* Media Queries */
@media (min-width: 768px) {
    nav {
        display: flex;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Dark Theme */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #9F67FF;  /* Lighter purple for better contrast */
        --primary-light: #B794F4;
        --primary-dark: #7C3AED;
        --primary-hover: #A78BFA;
        --bg1: #2D1B69;  /* Darker purple background */
        --text2: #F9FAFB;  /* Light text for dark theme */
        --text1: #D1D5DB;
        --bg2: #1F2937;  /* Dark background for cards */
        --bg-gray: #111827;  /* Dark background */
        --footer-bg: #0F172A;
    }

    .btn-signup,
    .btn-primary {
        background-color: var(--primary);
        color: #F9FAFB;
    }

    .btn-link {
        color: var(--primary-light);
    }

    footer h4 {
        color: var(--primary);
    }
}