/* Green Squirrel Dev - Main Stylesheet */

/* ===== CSS Variables ===== */
:root {
    /* Professional Dark Theme */
    --color-primary: #3dd13d;
    /* Vibrant Green - stands out on dark background */
    --color-primary-dark: #2ea82e;
    --color-primary-light: #5ae65a;
    --color-secondary: #d4a574;
    /* Lighter warm brown for visibility */
    --color-accent: #FFA500;
    /* Bright Orange/Amber */
    --color-background: #0f1419;
    /* Deep dark background */
    --color-surface: #1a1f26;
    /* Slightly lighter surface for cards */
    --color-surface-elevated: #242b35;
    /* Even lighter for hover states */
    --color-text: #e6edf3;
    /* Light text for readability */
    --color-text-light: #8b949e;
    /* Muted text */
    --color-text-lighter: #6e7681;
    /* Even more muted */
    --color-border: #30363d;
    /* Subtle borders */
    --color-success: #3fb950;
    --color-error: #f85149;
    --color-warning: #d29922;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;

    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-sm: 4px;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.7);

    --transition: all 0.3s ease;
}

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

html,
body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

/* ===== Header & Navigation ===== */
.header {
    background-color: var(--color-surface);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--color-text);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #6d3710;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-large {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1.125rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Hero Section ===== */
.hero-section {
    padding: var(--spacing-xxl) 0;
    background: linear-gradient(135deg, #1a2f1a 0%, #0f1f0f 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.brand-highlight {
    color: var(--color-primary);
    position: relative;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.squirrel-mascot {
    max-width: 100%;
    height: auto;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ===== Projects Section ===== */
.projects-section {
    padding: var(--spacing-xxl) 0;
}

.coming-soon-section {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

/* ===== Project Card ===== */
.project-card {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background-color: var(--color-surface-elevated);
}

.project-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
    background-color: var(--color-background);
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-status {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.status-live {
    background-color: var(--color-success);
}

.status-development {
    background-color: var(--color-warning);
    color: var(--color-text);
}

.status-coming-soon {
    background-color: var(--color-text-light);
}

.project-content {
    padding: var(--spacing-md);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
}

.project-description {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.project-screenshots {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.screenshot-thumb {
    width: calc(33.333% - var(--spacing-xs));
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.screenshot-thumb:hover {
    transform: scale(1.05);
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.tech-badge {
    background-color: var(--color-background);
    color: var(--color-text);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
}

.project-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.project-actions .icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ===== About Section ===== */
.about-section {
    padding: var(--spacing-xxl) 0;
    background-color: var(--color-surface);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

.about-text .lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

.about-text h3 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.philosophy-list {
    list-style: none;
    padding: 0;
}

.philosophy-list li {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    background-color: var(--color-background);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--border-radius-sm);
}

.about-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-section {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background-color: var(--color-background);
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-primary);
    color: white;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-link:hover {
    background-color: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
}

.contact-link .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--color-text);
    color: var(--color-background);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    color: var(--color-primary-light);
    margin-bottom: var(--spacing-sm);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: var(--color-background);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: var(--color-text-lighter);
}

.footer-credits {
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

/* ===== Profile Page ===== */
.profile-container {
    padding: var(--spacing-xl) 0;
    max-width: 800px;
}

.profile-card {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--color-primary);
}

.profile-info h2 {
    margin-bottom: var(--spacing-xs);
}

.profile-info .email {
    color: var(--color-text-light);
}

.profile-details {
    margin-bottom: var(--spacing-lg);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.detail-row .label {
    font-weight: 600;
    color: var(--color-text);
}

.detail-row .value {
    color: var(--color-text-light);
}

.profile-actions {
    margin-top: var(--spacing-lg);
}

.info-text {
    color: var(--color-text-light);
    font-style: italic;
}

/* ===== Account Settings Page ===== */
.account-container {
    padding: var(--spacing-xl) 0;
    max-width: 800px;
}

.account-card {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.account-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.account-header .profile-picture {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    object-fit: cover;
}

.profile-picture-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    background-color: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
}

.account-info h2 {
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
}

.account-info .email {
    color: var(--color-text-light);
    margin: 0;
}

.account-form {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.account-form h3 {
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
    font-size: 1.25rem;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: var(--spacing-sm);
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(61, 209, 61, 0.2);
}

.form-hint {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--color-text-lighter);
}

.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.account-details h3 {
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
    font-size: 1.25rem;
}

/* ===== Alerts ===== */
.alert {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
}

.alert-error {
    background-color: rgba(248, 81, 73, 0.15);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.alert-success {
    background-color: rgba(63, 185, 80, 0.15);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

/* ===== User Link in Nav ===== */
.user-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 500;
}

.user-link:hover {
    color: var(--color-primary);
}

/* ===== Extension Auth Page ===== */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    text-align: center;
}

.auth-card h1 {
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.success-message,
.error-message {
    padding: var(--spacing-lg);
}

.checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
}

.checkmark-circle {
    stroke: var(--color-success);
    stroke-width: 2;
    fill: none;
}

.checkmark-check {
    stroke: var(--color-success);
    stroke-width: 3;
}

/* ===== Loading Spinner ===== */
.loading {
    text-align: center;
    padding: var(--spacing-lg);
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.loading-spinner,
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-sm);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Error UI ===== */
#blazor-error-ui {
    background: var(--color-error);
    color: white;
    padding: var(--spacing-sm);
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    display: none;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    color: white;
    text-decoration: underline;
    cursor: pointer;
    margin-left: var(--spacing-sm);
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: -1;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .project-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-light);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}
