/* Cool Code Website Styles */

:root {
    /* Indie/Retro Color Palette */
    --primary-color: #d4a574;  /* Warm golden yellow */
    --secondary-color: #c9a96e; /* Dusty gold */
    --accent-color: #a8c686;   /* Sage green */
    --pink-accent: #e5a3a3;    /* Dusty pink */
    --blue-accent: #87ceeb;    /* Sky blue */
    
    /* Backgrounds with warm, paper-like feel */
    --bg-main: #f7f3e9;        /* Cream/off-white */
    --bg-card: #ffffff;        /* Pure white for polaroids */
    --bg-code: #2d2a24;        /* Dark brown for code */
    --bg-secondary: #f0ebe0;   /* Slightly darker cream */
    
    /* Text colors with character */
    --text-primary: #3c3530;   /* Dark brown */
    --text-secondary: #5a5147; /* Medium brown */
    --text-muted: #8b7d6b;     /* Light brown */
    --text-code: #e8e2d5;      /* Light for code */
    
    /* Borders and decorative elements */
    --border-color: #d4c4a8;
    --border-dark: #a69885;
    --paper-shadow: 3px 3px 8px rgba(0, 0, 0, 0.15);
    --polaroid-shadow: 4px 4px 12px rgba(0, 0, 0, 0.2);
    
    /* Status colors with vintage feel */
    --success-color: #7eb069;
    --warning-color: #e6b84a;
    --error-color: #d47070;
    
    /* Gradients with organic feel */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-warm: linear-gradient(45deg, #f7f3e9, #f0ebe0);
    --gradient-sunset: linear-gradient(135deg, #e5a3a3, #d4a574, #a8c686);
}

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

body {
    font-family: 'Courier New', 'Fira Code', monospace;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Paper texture background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        var(--gradient-warm),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><defs><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0"/></filter></defs><rect width="100%" height="100%" filter="url(%23noise)"/></svg>');
    pointer-events: none;
    z-index: -1;
    opacity: 0.7;
}

/* Add some hand-drawn style doodles */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><path d="M20,20 Q30,10 40,20 Q50,30 60,20" stroke="%23d4a574" stroke-width="2" fill="none" opacity="0.1"/><circle cx="150" cy="50" r="3" fill="%23a8c686" opacity="0.2"/><path d="M10,150 L30,160 L25,180" stroke="%23e5a3a3" stroke-width="2" fill="none" opacity="0.1"/></svg>');
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0 40px;
    position: relative;
    background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-secondary) 100%);
    border-radius: 0 0 50px 50px;
    margin-bottom: 40px;
    box-shadow: var(--paper-shadow);
}

.indie-decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.doodle {
    position: absolute;
    font-size: 1.5rem;
    animation: float 4s ease-in-out infinite;
    opacity: 0.6;
}

.doodle-1 { top: 20px; left: 20px; animation-delay: 0s; }
.doodle-2 { top: 40px; right: 30px; animation-delay: 1s; }
.doodle-3 { bottom: 30px; left: 40px; animation-delay: 2s; }

.tape {
    position: absolute;
    width: 60px;
    height: 20px;
    background: rgba(255, 255, 0, 0.7);
    border: 1px solid rgba(255, 255, 0, 0.8);
    border-radius: 2px;
    transform: rotate(-15deg);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.tape-1 { top: 80px; left: 100px; transform: rotate(-25deg); }
.tape-2 { bottom: 60px; right: 80px; transform: rotate(20deg); }

.ascii-art {
    font-family: 'Courier New', monospace;
    font-size: 0.6rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    opacity: 0.7;
    white-space: pre;
    line-height: 1.2;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.logo {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    font-family: 'Caveat', cursive;
}

.cool {
    color: var(--primary-color);
    text-shadow: 2px 2px 0px var(--secondary-color);
    animation: subtle-bounce 3s ease-in-out infinite;
}

.code {
    color: var(--accent-color);
    font-family: 'Fira Code', monospace;
    position: relative;
    text-shadow: 1px 1px 0px var(--border-dark);
}

.cursor {
    color: var(--accent-color);
    animation: blink 1.2s infinite;
    font-family: 'Fira Code', monospace;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

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

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Caveat', cursive;
    font-weight: 500;
}

.tagline.handwritten {
    transform: rotate(-1deg);
    font-size: 1.3rem;
}

.subtitle {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.vintage-counter, .currently-playing {
    background: var(--bg-card);
    padding: 8px 15px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    box-shadow: var(--paper-shadow);
    font-family: 'Courier Prime', monospace;
}

/* Hero Controls */
.hero-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
    position: relative;
}

.surprise-btn, .theme-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--paper-shadow);
    transform: rotate(-1deg);
    position: relative;
}

.surprise-btn:hover, .theme-btn:hover {
    transform: rotate(0deg) translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Active button states */
.theme-btn.active {
    background: var(--gradient-accent);
    transform: rotate(0deg) translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.surprise-btn:nth-child(2) { transform: rotate(0.5deg); }
.surprise-btn:nth-child(3) { transform: rotate(-0.8deg); }

/* Theme Menu */
.theme-menu {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateX(-10px) translateY(-10px);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--polaroid-shadow);
    z-index: 100;
    margin-top: 10px;
    min-width: 200px;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: top left;
}

.theme-menu.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px) translateY(-20px) scale(0.95);
    pointer-events: none;
}

.theme-option {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 5px;
    font-family: 'Courier Prime', monospace;
    transition: all 0.3s ease;
}

.theme-option:hover {
    background: var(--bg-secondary);
    transform: translateX(5px);
}

.theme-option.active {
    background: var(--accent-color);
    color: white;
}


/* Floating animations */
.hero-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-brackets {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.floating-brackets:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-brackets:nth-child(2) {
    top: 30%;
    right: 15%;
    animation-delay: 2s;
}

.floating-brackets:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

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

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Search and Filter Section */
.search-section {
    padding: 20px 0 30px;
    background: linear-gradient(45deg, var(--bg-secondary), var(--bg-main));
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--paper-shadow);
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    font-family: 'Courier Prime', monospace;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(168, 198, 134, 0.2);
}

.search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.tag-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-family: 'Caveat', cursive;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.tag-btn:hover::before,
.tag-btn.active::before {
    left: 0;
}

.tag-btn:hover,
.tag-btn.active {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.results-count {
    text-align: center;
    font-family: 'Caveat', cursive;
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Animation for filtered snippets */
.snippet-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.snippet-card.hidden {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    pointer-events: none;
}

.snippet-card.filtered-out {
    display: none;
}

.snippets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Polaroid-style Snippet Cards */
.snippet-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px 20px 50px 20px; /* Extra bottom padding for polaroid effect */
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: visible;
    box-shadow: var(--polaroid-shadow);
    transform: rotate(0deg);
    margin: 15px;
}

/* Add polaroid tape effect */
.snippet-card::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(-5deg);
    width: 40px;
    height: 15px;
    background: rgba(255, 255, 0, 0.8);
    border: 1px solid rgba(255, 255, 0, 0.9);
    border-radius: 2px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Random rotation for organic feel */
.snippet-card:nth-child(2n) {
    transform: rotate(1deg);
}

.snippet-card:nth-child(3n) {
    transform: rotate(-1.5deg);
}

.snippet-card:nth-child(4n) {
    transform: rotate(0.5deg);
}

.snippet-card:nth-child(5n) {
    transform: rotate(-0.8deg);
}

.snippet-card:hover {
    transform: rotate(0deg) translateY(-8px) scale(1.02);
    box-shadow: 
        var(--polaroid-shadow),
        0 15px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.snippet-card.featured {
    background: linear-gradient(135deg, #fff9e6, #ffffff);
    /* Subtle featured styling - no permanent border */
}

/* Polaroid caption area */
.snippet-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.difficulty {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty.easy {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.difficulty.medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.difficulty.hard {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}

/* Code Container */
.code-container {
    background: var(--bg-code);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow-x: auto;
}

.code-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-accent);
}

pre {
    margin: 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #e2e8f0;
}

code {
    font-family: 'Fira Code', monospace;
}

/* Prism.js overrides */
pre[class*="language-"] {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

.token.comment {
    color: #6b7280 !important;
    font-style: italic;
}

.token.string {
    color: #10b981 !important;
}

.token.number {
    color: #f59e0b !important;
}

.token.keyword {
    color: #8b5cf6 !important;
}

.token.function {
    color: #06b6d4 !important;
}

.token.operator {
    color: #f472b6 !important;
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating-system {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.3;
    transition: all 0.2s ease;
    transform: scale(1);
    padding: 4px;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.star:hover,
.star.active {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

.star:hover ~ .star {
    opacity: 0.3;
}

.copy-btn, .try-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
}

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

.try-btn {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
}

.copy-btn:hover, .try-btn:hover {
    transform: translateY(-2px);
}

.copy-btn:hover {
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.try-btn:hover {
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.copy-btn:active, .try-btn:active {
    transform: translateY(0);
}

.likes {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 12px;
    user-select: none;
}

.likes:hover {
    color: var(--error-color);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Terminal Section */
.terminal-section {
    margin: 60px 0;
    display: flex;
    justify-content: center;
}

.terminal-container {
    background: #1a1a1a;
    border-radius: 8px;
    box-shadow: var(--polaroid-shadow);
    max-width: 800px;
    width: 100%;
    overflow: hidden;
    font-family: 'Fira Code', monospace;
}

.terminal-header {
    background: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #444;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.btn-close, .btn-minimize, .btn-maximize {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.btn-close { background: #ff5f57; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #28ca42; }

.terminal-title {
    color: #8b8b8b;
    font-size: 0.9rem;
    flex: 1;
    text-align: center;
}

.terminal-body {
    background: #000;
    padding: 20px;
    min-height: 200px;
    color: #00ff00;
}

.terminal-content {
    margin-bottom: 10px;
}

.terminal-line {
    margin-bottom: 8px;
    line-height: 1.4;
}

.prompt {
    color: #00ff00;
    user-select: none;
}

.welcome-text {
    color: #00ff00;
}

.help-text {
    color: #888;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    outline: none;
    flex: 1;
    caret-color: #00ff00;
}

.terminal-input::placeholder {
    color: #555;
}

/* About Section */
.about-section {
    margin: 60px 0;
    display: flex;
    justify-content: center;
}

.about-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px;
    max-width: 800px;
    position: relative;
    box-shadow: var(--polaroid-shadow);
    border: 2px solid var(--border-color);
    transform: rotate(-0.5deg);
}

.photo-strip {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.photo-booth-pic {
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border: 3px solid #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
    transform: rotate(-2deg);
}

.photo-booth-pic:nth-child(2n) { transform: rotate(1deg); }
.photo-booth-pic:nth-child(3n) { transform: rotate(-1deg); }

.about-title {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    transform: rotate(-1deg);
}

.bio-text {
    font-family: 'Courier Prime', monospace;
    line-height: 1.8;
    color: var(--text-primary);
}

.bio-text p {
    margin-bottom: 20px;
}

.fun-facts {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid var(--accent-color);
}

.fact {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.counter {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.8rem;
}

.signature {
    font-style: italic;
    color: var(--text-secondary);
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
}

.social-doodles {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.doodle-link {
    background: var(--pink-accent);
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    transform: rotate(-1deg);
}

.doodle-link:hover {
    transform: rotate(0deg) scale(1.05);
    background: var(--accent-color);
}

.corner-fold {
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--bg-secondary) 50%, var(--border-color) 50%);
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

/* Guest Book Section */
.guestbook-section {
    margin: 60px 0;
    background: var(--bg-secondary);
    padding: 40px 20px;
    border-radius: 20px;
    border: 2px dashed var(--border-color);
}

.guestbook-container {
    max-width: 700px;
    margin: 0 auto;
}

.guestbook-title {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
    transform: rotate(-0.5deg);
}

.guestbook-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-style: italic;
}

.guestbook-entries {
    margin-bottom: 40px;
}

.entry {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--paper-shadow);
    transform: rotate(-0.2deg);
}

.entry:nth-child(2n) { transform: rotate(0.3deg); }
.entry:nth-child(3n) { transform: rotate(-0.1deg); }

.entry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.username {
    color: var(--primary-color);
    font-weight: bold;
    font-family: 'Fira Code', monospace;
}

.timestamp {
    color: var(--text-muted);
    font-style: italic;
}

.entry-text {
    color: var(--text-primary);
    font-family: 'Courier Prime', monospace;
}

.add-entry {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: var(--paper-shadow);
}

.handle-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier Prime', monospace;
    background: var(--bg-main);
    color: var(--text-primary);
    margin-bottom: 15px;
}

.message-container {
    position: relative;
    margin-bottom: 15px;
}

.message-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier Prime', monospace;
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 80px;
    resize: vertical;
    padding-bottom: 35px;
}

.character-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Courier Prime', monospace;
    background: var(--bg-main);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

.character-count.warning {
    color: var(--warning-color);
}

.character-count.danger {
    color: var(--error-color);
    font-weight: bold;
}

.submit-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--paper-shadow);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 2px dashed var(--border-color);
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
}

.footer-content p:last-child {
    margin-bottom: 0;
}

/* Search Section Responsive Styles */
@media (max-width: 768px) {
    .search-section {
        margin-bottom: 20px;
        padding: 15px 0 20px;
    }
    
    .search-container {
        padding: 0 15px;
    }
    
    .search-input {
        padding: 12px 45px 12px 15px;
        font-size: 14px;
    }
    
    .filter-tags {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 5px;
        gap: 8px;
    }
    
    .filter-tags::-webkit-scrollbar {
        height: 4px;
    }
    
    .filter-tags::-webkit-scrollbar-track {
        background: var(--bg-secondary);
        border-radius: 2px;
    }
    
    .filter-tags::-webkit-scrollbar-thumb {
        background: var(--accent-color);
        border-radius: 2px;
    }
    
    .tag-btn {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .results-count {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .search-input {
        padding: 10px 40px 10px 12px;
        font-size: 13px;
    }
    
    .search-clear {
        right: 12px;
        font-size: 16px;
    }
    
    .tag-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .results-count {
        font-size: 13px;
        margin-top: 5px;
    }
}

/* Code Playground Styles */
.playground-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.playground-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.playground-container {
    background: var(--bg-main);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    border: 2px solid var(--border-color);
    animation: playgroundSlideIn 0.3s ease-out;
}

@keyframes playgroundSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.playground-header {
    background: var(--gradient-primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playground-header h3 {
    margin: 0;
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.playground-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 70vh;
    gap: 1px;
    background: var(--border-color);
}

.code-editor-section, .output-section {
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
}

.editor-header, .output-header {
    background: var(--bg-secondary);
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Caveat', cursive;
    font-weight: 600;
    font-size: 1.1rem;
}

.editor-controls {
    display: flex;
    gap: 8px;
}

.run-btn, .clear-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Courier Prime', monospace;
}

.clear-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.run-btn:hover, .clear-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.code-editor {
    flex: 1;
    padding: 15px;
    border: none;
    outline: none;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg-card);
    color: var(--text-primary);
    resize: none;
    tab-size: 4;
}

.code-editor:focus {
    background: #ffffff;
    box-shadow: inset 0 0 0 2px var(--accent-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.status-text {
    font-family: 'Courier Prime', monospace;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-secondary);
}

.status-text.running {
    background: #ffa500;
    color: white;
}

.status-text.success {
    background: #4caf50;
    color: white;
}

.status-text.error {
    background: #f44336;
    color: white;
}

.loading-spinner {
    animation: spin 1s linear infinite;
    font-size: 1.2rem;
    color: var(--primary-color);
}

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

.terminal-output {
    flex: 1;
    padding: 15px;
    background: #1a1a1a;
    color: #00ff00;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.4;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.output-line {
    margin-bottom: 4px;
}

.output-line .prompt {
    color: #888;
}

.output-line .output-text {
    color: #00ff00;
}

.output-line .error-text {
    color: #ff6b6b;
}

.playground-footer {
    background: var(--bg-secondary);
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.execution-info {
    font-family: 'Courier Prime', monospace;
    color: var(--text-muted);
}

.playground-tips {
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive playground */
@media (max-width: 768px) {
    .playground-container {
        margin: 10px;
        max-height: 95vh;
    }
    
    .playground-content {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        height: 60vh;
    }
    
    .playground-footer {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .code-editor {
        font-size: 12px;
    }
    
    .terminal-output {
        font-size: 11px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 60px 0 40px;
    }
    
    .snippets-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .snippet-card {
        padding: 20px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .card-footer .copy-btn,
    .card-footer .try-btn {
        display: flex;
        justify-content: center;
    }
    
    .rating-system {
        justify-content: space-between;
        padding: 10px 0;
    }
    
    .stars {
        gap: 8px;
    }
    
    .star {
        font-size: 1.2rem;
        min-width: 32px;
        min-height: 32px;
        padding: 6px;
    }
    
    .likes {
        font-size: 1rem;
        padding: 8px 12px;
        background: var(--bg-secondary);
        border-radius: 20px;
        border: 1px solid var(--border-color);
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: var(--paper-shadow);
    }
    
    .likes:hover {
        background: var(--accent-color);
        color: white;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .copy-btn, .try-btn {
        margin-right: 0;
        margin-bottom: 8px;
        flex: 1;
        text-align: center;
    }
    
    .code-container {
        padding: 16px;
    }
    
    pre {
        font-size: 0.8rem;
    }
    
    /* Mobile menu positioning */
    .theme-menu {
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: 250px;
    }
    
    .theme-menu.hidden {
        transform: translateX(-50%) translateY(-20px) scale(0.95);
    }
}

@media (max-width: 480px) {
    .tagline {
        font-size: 1.1rem;
    }
    
    .snippet-card {
        padding: 16px;
        margin: 10px;
    }
    
    .code-container {
        padding: 12px;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .rating-system {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        padding: 15px 0;
    }
    
    .stars {
        justify-content: center;
        gap: 12px;
    }
    
    .star {
        font-size: 1.3rem;
        min-width: 36px;
        min-height: 36px;
        padding: 8px;
    }
    
    .likes {
        font-size: 1.1rem;
        padding: 10px 16px;
        background: var(--bg-secondary);
        border-radius: 25px;
        border: 2px solid var(--border-color);
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: var(--paper-shadow);
    }
    
    .likes:hover {
        background: var(--accent-color);
        color: white;
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .copy-btn {
        width: 100%;
        padding: 12px;
    }
    
    .hero-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .surprise-btn, .theme-btn {
        min-width: 200px;
    }
}

/* Scroll animations */
@media (prefers-reduced-motion: no-preference) {
    .snippet-card {
        opacity: 0;
        transform: translateY(20px);
        animation: slideInUp 0.6s ease forwards;
    }
    
    .snippet-card:nth-child(1) { animation-delay: 0.1s; }
    .snippet-card:nth-child(2) { animation-delay: 0.2s; }
    .snippet-card:nth-child(3) { animation-delay: 0.3s; }
    .snippet-card:nth-child(4) { animation-delay: 0.4s; }
    .snippet-card:nth-child(5) { animation-delay: 0.5s; }
    .snippet-card:nth-child(6) { animation-delay: 0.6s; }
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes easterEggPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(-5deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(-3deg); }
    30% { transform: rotate(3deg); }
    45% { transform: rotate(-2deg); }
    60% { transform: rotate(2deg); }
    75% { transform: rotate(-1deg); }
}

/* Update floating elements animation */
.floating-elements {
    position: absolute;
    font-size: 2rem;
    opacity: 0.4;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.floating-elements:nth-child(1) {
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.floating-elements:nth-child(2) {
    top: 25%;
    right: 20%;
    animation-delay: 2s;
}

.floating-elements:nth-child(3) {
    bottom: 20%;
    left: 25%;
    animation-delay: 4s;
}