/* Base Variables & Reset */
:root {
    /* Default Light Theme */
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f8f9fa;
    --card-border: #e9ecef;
    --card-hover-bg: #e2e6ea;
    --accent-color: #007bff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 8px;
    --header-bg: #f8f9fa;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --card-border: #333333;
    --card-hover-bg: #2c2c2c;
    --accent-color: #bb86fc;
    --header-bg: #1e1e1e;
    --shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Cute Theme */
[data-theme="cute"] {
    --bg-color: #fff0f5; /* Lavender Blush */
    --text-color: #5d4037;
    --card-bg: #ffffff;
    --card-border: #ffb6c1; /* Light Pink */
    --card-hover-bg: #ffe4e1; /* Misty Rose */
    --accent-color: #ff69b4; /* Hot Pink */
    --font-family: 'Comic Neue', 'Quicksand', cursive, sans-serif;
    --border-radius: 20px;
    --header-bg: #ffe4e1;
    --shadow: 0 4px 8px rgba(255, 105, 180, 0.2);
}

/* Funny Theme */
[data-theme="funny"] {
    --bg-color: #ffeb3b; /* Yellow */
    --text-color: #3e2723;
    --card-bg: #ffffff;
    --card-border: #ff9800; /* Orange */
    --card-hover-bg: #fff176;
    --accent-color: #d84315;
    --font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    --border-radius: 25px 5px 25px 5px; /* Quirky borders */
    --header-bg: #ff9800;
    --shadow: 5px 5px 0px #000000; /* Hard shadow */
}

/* Cool Theme (Cyberpunk) */
[data-theme="cool"] {
    --bg-color: #0d0d0d;
    --text-color: #00ff00; /* Neon Green */
    --card-bg: #1a1a1a;
    --card-border: #00ff00;
    --card-hover-bg: #003300;
    --accent-color: #00ff00;
    --font-family: 'Courier New', Courier, monospace;
    --border-radius: 0px;
    --header-bg: #001100;
    --shadow: 0 0 10px #00ff00; /* Neon Glow */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background-color: var(--header-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

/* Theme Switcher */
.theme-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    padding: 10px;
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    z-index: 100;
}

.theme-switcher select {
    padding: 5px;
    font-family: inherit;
    border-radius: 4px;
    border: 1px solid var(--card-border);
    background: var(--bg-color);
    color: var(--text-color);
}

/* Main Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Card Styles */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.card:hover {
    background-color: var(--card-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15); /* Slightly lifted shadow */
}

/* Cool theme hover effect override */
[data-theme="cool"] .card:hover {
    box-shadow: 0 0 20px #00ff00;
}
/* Funny theme hover effect override */
[data-theme="funny"] .card:hover {
    box-shadow: 8px 8px 0px #000000;
}

.card h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.card .arrow {
    font-size: 1.5rem;
    color: var(--accent-color);
    transition: transform 0.2s;
}

.card:hover .arrow {
    transform: translateX(5px);
}

/* Footer */
footer {
    text-align: center;
    margin-top: auto;
    padding: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    
    .theme-switcher {
        position: static;
        margin-bottom: 20px;
        text-align: right;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
    }
}
