/* Retro Terminal Light Theme - VibeCoder */

/* Import retro terminal fonts */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&display=swap');

/* Base Styles */
body {
    font-family: 'VT323', 'Courier New', monospace;
    background-color: #f0f0f0;
    color: #006600; /* Dark green for text */
    line-height: 1.2;
    text-shadow: 0 0 2px rgba(0, 102, 0, 0.3);
    position: relative;
}

/* CRT scan lines overlay - more subtle for light mode */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03),
        rgba(0, 0, 0, 0.03) 1px,
        rgba(0, 0, 0, 0) 1px,
        rgba(0, 0, 0, 0) 2px
    );
    pointer-events: none;
    z-index: 9999;
}

/* CRT flicker animation - more subtle for light mode */
@keyframes flicker {
    0% { opacity: 0.99; }
    5% { opacity: 1; }
    10% { opacity: 0.99; }
    15% { opacity: 0.99; }
    20% { opacity: 1; }
    25% { opacity: 0.99; }
    30% { opacity: 0.99; }
    35% { opacity: 1; }
    40% { opacity: 0.99; }
    45% { opacity: 1; }
    50% { opacity: 0.99; }
    55% { opacity: 0.99; }
    60% { opacity: 0.99; }
    65% { opacity: 1; }
    70% { opacity: 0.99; }
    75% { opacity: 0.99; }
    80% { opacity: 1; }
    85% { opacity: 0.99; }
    90% { opacity: 0.99; }
    95% { opacity: 0.99; }
    100% { opacity: 1; }
}

body {
    animation: flicker 15s infinite;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Press Start 2P', 'VT323', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: #004400;
}

/* Blinking cursor animation */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Header styles */
header.navbar {
    background-color: #e0e0e0 !important;
    border-bottom: 2px solid #006600;
    box-shadow: 0 2px 10px rgba(0, 102, 0, 0.2);
}

.navbar-brand {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: #006600 !important;
}

.navbar-brand::before {
    content: "> ";
    animation: blink 1s step-end infinite;
}

.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
    color: #006600 !important;
}

/* Match header burger menu to footer burger menu */
.navbar-toggler {
    background-color: #e0e0e0 !important;
    color: #006600 !important;
    border: 2px solid #006600 !important;
    border-radius: 0 !important;
    padding: 4.8px 16px !important;
    padding-block-start: 4.8px !important;
    padding-block-end: 4.8px !important;
    padding-inline-start: 16px !important;
    padding-inline-end: 16px !important;
    box-shadow: 0 0 10px rgba(0, 102, 0, 0.2);
    font-family: "Font Awesome 6 Free" !important;
    font-feature-settings: normal !important;
    font-kerning: auto !important;
    font-optical-sizing: auto !important;
    font-size: 19.2px !important;
    font-size-adjust: none !important;
    font-stretch: 100% !important;
    font-style: normal !important;
    font-variant-alternates: normal !important;
    font-variant-caps: normal !important;
    font-variant-east-asian: normal !important;
    font-variant-emoji: normal !important;
    font-variant-ligatures: normal !important;
    font-variant-numeric: normal !important;
    font-variant-position: normal !important;
    font-variation-settings: normal !important;
    font-weight: 900 !important;
    height: auto !important;
    letter-spacing: 0.48px !important;
    line-height: 28.8px !important;
    text-align: center !important;
    text-indent: 0px !important;
    text-rendering: auto !important;
    text-shadow: none !important;
    text-size-adjust: 100% !important;
    text-transform: uppercase !important;
    transition-behavior: normal, normal, normal !important;
    transition-delay: 0s, 0s, 0s !important;
    transition-duration: 0.3s, 0.3s, 0.3s !important;
    transition-property: background-color, color, border-color !important;
    transition-timing-function: ease, ease, ease !important;
    width: auto !important;
}

.navbar-toggler:hover {
    background-color: #006600 !important;
    color: #f0f0f0 !important;
    text-shadow: none !important;
}

/* Style the Font Awesome burger icon to match */
.navbar-toggler .fas.fa-bars {
    font-size: 19.2px !important;
    color: inherit !important;
}

/* Footer styles */
.footer {
    background-color: #e0e0e0 !important;
    border-top: 2px solid #006600;
    color: #006600;
    box-shadow: 0 -2px 10px rgba(0, 102, 0, 0.2);
}

.footer .text-muted,
.footer a.text-decoration-none {
    color: #006600 !important;
    opacity: 0.8;
}

.footer a:hover {
    color: #004400 !important;
    text-shadow: 0 0 5px #006600;
}

/* Footer strapline for retro light theme */
.strapline {
    font-size: 1.4rem;
    letter-spacing: 0.05rem;
    padding: 0.5rem 0;
    color: #006600 !important;
}

/* Buttons with pixelated styling */
.btn {
    font-family: 'VT323', monospace;
    text-transform: uppercase;
    font-size: 1.2rem;
    padding: 0.3rem 1rem;
    position: relative;
    background-color: #e0e0e0 !important;
    color: #006600 !important;
    border: 2px solid #006600 !important;
    border-radius: 0 !important;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 102, 0, 0.2);
}

.btn:hover {
    background-color: #006600 !important;
    color: #f0f0f0 !important;
    text-shadow: none;
}

.btn-primary, 
.btn-secondary, 
.btn-success, 
.btn-danger {
    background-color: #e0e0e0 !important;
    border: 2px solid #006600 !important;
    color: #006600 !important;
}

.btn-danger, .btn-danger:hover {
    border-color: #990000 !important;
    color: #990000 !important;
}

.btn-danger:hover {
    background-color: #990000 !important;
    color: #f0f0f0 !important;
}

.btn-success:hover {
    border-color: #006600 !important;
    background-color: #006600 !important;
    color: #f0f0f0 !important;
}

/* Terminal-style sidebar */
#sidebar {
    background-color: #e0e0e0 !important;
    border-right: 2px solid #006600;
    box-shadow: inset -5px 0 15px rgba(0, 0, 0, 0.1);
}

#sidebar-handle {
    background-color: #006600;
    color: #f0f0f0;
    border: 0;
}

/* Cards and containers */
.card, .modal-content {
    background-color: #f0f0f0 !important;
    border: 2px solid #006600 !important;
    border-radius: 0 !important;
    box-shadow: 0 0 10px rgba(0, 102, 0, 0.2);
    position: relative;
}

/* Pixel art corner decorations */
.card::before {
    content: "╔══";
    position: absolute;
    top: -10px;
    left: -5px;
    color: #006600;
    font-size: 1.2rem;
}

.card::after {
    content: "══╗";
    position: absolute;
    top: -10px;
    right: -5px;
    color: #006600;
    font-size: 1.2rem;
}

.card-header {
    background-color: #e0e0e0 !important;
    border-bottom: 2px solid #006600;
    color: #006600;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    padding: 0.5rem;
}

/* Form inputs */
.form-control, .form-select {
    background-color: #f0f0f0 !important;
    color: #006600 !important;
    border: 2px solid #006600 !important;
    border-radius: 0 !important;
    padding: 0.5rem;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    box-shadow: inset 0 0 10px rgba(0, 102, 0, 0.1);
}

.form-control:focus, .form-select:focus {
    background-color: #f0f0f0 !important;
    color: #006600 !important;
    border-color: #006600 !important;
    box-shadow: 0 0 10px rgba(0, 102, 0, 0.3), inset 0 0 10px rgba(0, 102, 0, 0.1);
}

.form-check-input {
    background-color: #f0f0f0;
    border-color: #006600;
}

.form-check-input:checked {
    background-color: #006600;
    border-color: #006600;
}

.form-check-label {
    color: #006600;
}

/* Labels */
.form-label {
    color: #006600;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
}

/* Dropdown menu */
.dropdown-menu {
    background-color: #f0f0f0 !important;
    border: 2px solid #006600 !important;
    border-radius: 0 !important;
    box-shadow: 0 0 15px rgba(0, 102, 0, 0.2);
}

.dropdown-item {
    color: #006600 !important;
    font-family: 'VT323', monospace;
}

.dropdown-item:hover {
    background-color: #006600 !important;
    color: #f0f0f0 !important;
}

.dropdown-item.text-danger {
    color: #990000 !important;
}

.dropdown-item.text-danger:hover {
    background-color: #990000 !important;
    color: #f0f0f0 !important;
}

.dropdown-divider {
    border-top: 2px dotted #006600 !important;
    opacity: 0.5;
}

/* Project list styling */
.project-card {
    background-color: #f0f0f0 !important;
    border-left: 4px solid #006600 !important;
    margin-bottom: 5px;
}

.project-card:hover {
    background-color: #e0f0e0 !important;
}

.project-card.active {
    background-color: #d0e0d0 !important;
    border-left-color: #006600 !important;
}

.project-title {
    color: #006600 !important;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
}

.project-title::before {
    content: "";
    color: #006600;
    font-weight: bold;
}

/* Note styling */
.note-card {
    background-color: #f0f0f0 !important;
    font-size: 1.1em !important; /* Increased text size */
}

.note-card:hover {
    background-color: #e0f0e0 !important;
}

.note-card.active {
    background-color: #d0e0d0 !important;
}

.note-title {
    color: #006600 !important;
    font-family: 'VT323', monospace;
}

.note-title::before {
    content: "$ ";
    color: #006600;
}

.note-list {
    border-left: 2px dashed #006600 !important;
}

/* Chapter styling */
.chapter-card {
    border: 2px solid #006600 !important;
    background-color: #f0f0f0 !important;
    box-shadow: 0 0 10px rgba(0, 102, 0, 0.2);
}

.chapter-header {
    background-color: #e0f0e0 !important;
    color: #006600 !important;
    border-bottom: 2px solid #006600 !important;
}

.chapter-title-input {
    font-weight: 600;
    color: #006600;
    font-size: 1.4rem;
    border: 1px solid transparent;
    background-color: transparent;
    padding: 0.25rem 0.5rem 0.25rem 1.75rem;
    border-radius: 0.25rem;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.chapter-title-input:focus {
    outline: none;
    border-color: #006600;
    background-color: rgba(0, 102, 0, 0.05);
    box-shadow: 0 0 10px rgba(0, 102, 0, 0.2);
}

.chapter-title-wrapper::before {
    content: ">";
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #006600;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 1;
}

.chapter-title-wrapper:hover::before {
    color: #009900;
}

/* Modal styling */
.modal-header, .modal-footer {
    border-color: #006600 !important;
    background-color: #e0f0e0 !important;
}

.modal-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    color: #006600;
}

.btn-close {
    color: #006600 !important;
    filter: invert(28%) sepia(79%) saturate(1476%) hue-rotate(86deg) brightness(88%) contrast(89%);
}

/* Editable content areas */
[contenteditable="true"]:focus {
    outline: 2px solid #006600;
    background-color: rgba(0, 102, 0, 0.05);
}

/* Loading spinner */
.spinner-border {
    border-color: #006600;
    border-right-color: transparent;
}

/* Terminal glitch effect for headings */
@keyframes glitch {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 2px) }
    40% { transform: translate(-2px, -2px) }
    60% { transform: translate(2px, 2px) }
    80% { transform: translate(2px, -2px) }
    100% { transform: translate(0) }
}

h1:hover, h2:hover, h3:hover {
    animation: glitch 0.3s ease-in-out;
    text-shadow: 
        -2px 0 #009900,
        2px 2px #003300;
}

/* Welcome message with CRT color effect */
.welcome-message h2 {
    text-shadow: 
        0 0 5px #006600,
        0 0 10px #006600;
}

.welcome-message p {
    color: #006600;
    opacity: 0.8;
}

/* Projects and chapters */
#create-project-btn, #create-chapter-btn {
    border: 2px solid #006600;
    background-color: #f0f0f0;
    color: #006600;
    box-shadow: 0 0 10px rgba(0, 102, 0, 0.2);
}

#create-project-btn:hover, #create-chapter-btn:hover {
    background-color: #006600;
    color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 0, 0.3);
}

/* Tables */
.table {
    color: #006600;
    border-color: #006600;
}

.table th {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    border-bottom: 2px solid #006600;
}

.table td {
    border-color: #006600;
    opacity: 0.8;
}

/* Alerts */
.alert {
    background-color: #f0f0f0;
    border: 2px solid #006600;
    color: #006600;
    border-radius: 0;
}

.alert-danger {
    border-color: #990000;
    color: #990000;
}

.alert-success {
    border-color: #006600;
    color: #006600;
}

/* Add pixelation effect to images */
img {
    image-rendering: pixelated;
}

/* Custom text selection */
::selection {
    background-color: #006600;
    color: #f0f0f0;
}
