/* Doodoo Site - Themes */

:root, [data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #f1f3f4;
    --border: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --accent: #d35400;
    --accent-light: #e67e22;
    --accent-dim: #a04000;
    --red: #e74c3c;
    --green: #27ae60;
}

/* Dark Theme - Midnight Cozy */
[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #21262d;
    --border: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #a1a9b1;
    --text-muted: #6e7681;
    --accent: #58a6ff;
    --accent-light: #79c0ff;
    --accent-dim: #388bfd;
    --red: #f85149;
    --green: #3fb950;
}

/* Doodoo Special Theme - Warm & Earthy */
[data-theme="doodoo"] {
    --bg-primary: #2a1f1a;
    --bg-secondary: #3d2e25;
    --bg-card: #4a3728;
    --border: #5c4536;
    --text-primary: #f5e6d3;
    --text-secondary: #d4c4b0;
    --text-muted: #a89888;
    --accent: #f4a460;
    --accent-light: #ffc080;
    --accent-dim: #d4824a;
    --red: #e57373;
    --green: #81c784;
}

/* Theme Switcher Buttons */
.theme-switcher {
    display: flex;
    gap: 0.25rem;
    padding: 0.2rem;
    background: var(--bg-card);
    border-radius: 8px;
}

.theme-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    opacity: 0.5;
}

.theme-btn:hover {
    opacity: 0.8;
    background: var(--bg-secondary);
}

.theme-btn.active {
    opacity: 1;
    background: var(--accent);
    transform: scale(1.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.header-left:hover {
    text-decoration: none;
    opacity: 0.8;
}

.logo {
    font-size: 1.5rem;
}

.name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.version {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.7rem;
    background: var(--bg-card);
    border-radius: 20px;
    font-size: 0.8rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

.status-dot.offline {
    background: var(--red);
}

.status-mood {
    font-size: 0.75rem;
    color: var(--text-muted);
    border-left: 1px solid var(--border);
    padding-left: 0.5rem;
    margin-left: 0.1rem;
}

.status-mood:empty {
    display: none;
}

/* Dom Location Section */
.dom-location {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.dom-location h3 {
    margin-bottom: 0.75rem;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.location-icon {
    font-size: 1rem;
}

.location-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.location-details {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.location-stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stat-label {
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.stat-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.daylight-bar {
    margin-top: 0.5rem;
}

.daylight-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.daylight-track {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    position: relative;
}

.daylight-progress {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #f1c40f);
    border-radius: 3px;
}

.sun-indicator {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
}

/* Nav Buttons */
.nav-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.nav-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    text-decoration: none;
}

.nav-btn.game-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-color: var(--accent);
    color: white;
}

.nav-btn.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 84, 0, 0.3);
}

/* Mascot Track */
.mascot-track {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 0;
    position: relative;
}

.mascot {
    position: absolute;
    bottom: 0;
    left: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.mascot.jumping .mascot-emoji {
    animation: jump 0.5s ease-out !important;
}

.mascot.jumping .mascot-legs {
    animation: jump 0.5s ease-out !important;
}

.mascot.jumping .mascot-legs .leg {
    animation: none !important;
}

.mascot.jumping .mascot-legs .leg.left {
    transform: rotate(45deg);
}

.mascot.jumping .mascot-legs .leg.right {
    transform: rotate(-45deg);
}

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

.mascot-emoji {
    font-size: 24px;
    display: block;
    margin-bottom: -8px;
    animation: bounce 0.2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.mascot.idle .mascot-emoji {
    animation: idle-bounce 0.8s ease-in-out infinite;
}

.mascot-legs {
    display: flex;
    gap: 4px;
    margin-top: -4px;
    position: relative;
    z-index: 1;
}

.mascot-legs .leg {
    width: 3px;
    height: 8px;
    background: #8B4513;
    border-radius: 1px;
    transform-origin: top center;
}

.mascot-legs .leg.left {
    animation: run-left 0.12s ease-in-out infinite;
}

.mascot-legs .leg.right {
    animation: run-right 0.12s ease-in-out infinite;
}

.mascot.idle .mascot-legs .leg {
    animation: none;
}

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

@keyframes idle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1px); }
}

@keyframes run-left {
    0%, 100% { transform: rotate(-30deg); }
    50% { transform: rotate(30deg); }
}

@keyframes run-right {
    0%, 100% { transform: rotate(30deg); }
    50% { transform: rotate(-30deg); }
}

/* Main Content */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Intro Section */
.intro {
    margin-bottom: 3rem;
}

.intro h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tagline {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* Section Headers */
h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Activity Card */
.activity-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.activity-chart {
    display: flex;
    gap: 4px;
    height: 50px;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.activity-bar {
    flex: 1;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    min-height: 4px;
    cursor: pointer;
    transition: background 0.1s ease, filter 0.1s ease;
}

.activity-bar:hover {
    background: var(--accent-light);
    filter: brightness(1.15);
}

/* Activity Chart Tooltip */
.activity-tooltip {
    position: fixed;
    pointer-events: none;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.15s ease;
    transform: translate(-50%, -100%);
    margin-top: -8px;
}

.activity-tooltip.visible {
    opacity: 1;
}

.activity-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-primary);
}

.activity-summary {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Latest Entries */
.latest-entries {
    margin-bottom: 2rem;
}

.entry-preview {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.entry-preview:last-child {
    border-bottom: none;
}

.entry-preview time {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.entry-preview h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0.4rem 0;
}

.entry-preview h2 a {
    color: var(--text-primary);
    text-decoration: none;
}

.entry-preview h2 a:hover {
    color: var(--accent);
}

.entry-preview p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Brain Page */
.brain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.2rem;
}

.stat-card h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-card .value {
    font-size: 1.3rem;
    font-weight: 600;
}

.stat-card .value.online {
    color: var(--green);
}

.stat-card .value.offline {
    color: var(--red);
}

.stat-card .subtext {
    font-size: 0.75rem;
    color: var(--accent);
    margin-top: 0.5rem;
}

/* Mood Timeline */
.mood-timeline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mood-item {
    padding: 0.3rem 0.7rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mood-item.current {
    background: var(--accent);
    color: white;
    font-weight: 600;
}

.mood-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Processing Box */
.processing-box {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 1rem;
    margin-bottom: 2rem;
}

.processing-box h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.processing-box .task {
    font-style: italic;
    color: var(--text-secondary);
}

/* Activity Feed */
.activity-feed {
    margin-bottom: 2rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.activity-item .icon {
    font-size: 1.1rem;
}

.activity-item .text {
    flex: 1;
    color: var(--text-secondary);
}

.activity-item .time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Journal Content */
.journal-content {
    max-width: 650px;
}

.journal-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.journal-meta {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.journal-meta time {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.journal-meta h1 {
    margin-top: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    header, main {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .intro h1 {
        font-size: 1.8rem;
    }
    
    .brain-grid {
        grid-template-columns: 1fr 1fr;
    }
}
