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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    overflow: hidden;
    height: 100vh;
}

/* Title Screen */
.title-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: titleGradient 8s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    overflow: hidden;
}

@keyframes titleGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.title-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23stars)"/></svg>');
    animation: starfield 20s linear infinite;
}

@keyframes starfield {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.title-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.title-animation {
    position: relative;
    height: 200px;
    margin-bottom: 30px;
}

.title-gubby {
    width: 120px;
    height: 120px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: gubbyRocket 3s ease-in-out;
}

.title-gubby.crash {
    animation: gubbyCrash 1s ease-out forwards;
}

.rocket {
    font-size: 60px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: rocketFly 2s ease-in-out;
}

@keyframes gubbyRocket {
    0% { left: -100px; }
    50% { left: 50%; }
    100% { left: 120%; }
}

@keyframes gubbyCrash {
    0% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(180deg) scale(1.2); }
    100% { transform: translateX(-50%) rotate(360deg) scale(1); }
}

@keyframes rocketFly {
    0% { left: -100px; opacity: 1; }
    70% { left: 50%; opacity: 1; }
    100% { left: 120%; opacity: 0; }
}

.title-text {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: titleGlow 2s ease-in-out infinite alternate;
    background: linear-gradient(45deg, #fff, #ffd700, #fff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes titleGlow {
    from { text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
    to { text-shadow: 2px 2px 20px rgba(255,255,255,0.8); }
}

.title-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.menu-btn {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 18px 35px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(15px);
    min-width: 280px;
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* Achievements Screen */
.achievements-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 50%, #7c3aed 100%);
    background-size: 400% 400%;
    animation: achievementGradient 10s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    color: white;
}

@keyframes achievementGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.achievements-content {
    max-width: 800px;
    width: 90%;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 40px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.achievements-content h2 {
    font-size: 36px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

.achievement-item {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.achievement-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.achievement-item.unlocked::before {
    left: 100%;
}

.achievement-item.unlocked {
    background: rgba(255,215,0,0.15);
    border-color: rgba(255,215,0,0.4);
    animation: achievementGlow 3s ease-in-out infinite;
}

@keyframes achievementGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255,215,0,0.3); }
    50% { box-shadow: 0 0 25px rgba(255,215,0,0.6); }
}

.achievement-icon {
    font-size: 32px;
}

.achievement-info {
    text-align: left;
}

.achievement-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-description {
    font-size: 14px;
    opacity: 0.8;
}

.back-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 25px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Update Log Screen */
.update-log-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    color: white;
}

.update-log-content {
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.update-log-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.update-log-scroll {
    max-height: 60vh;
    overflow-y: auto;
    text-align: left;
    margin-bottom: 20px;
    padding: 0 10px;
}

.update-entry {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.update-date {
    font-size: 14px;
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 5px;
}

.update-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
}

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

.update-list li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
}

.update-list li:before {
    content: "•";
    color: #ffd700;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Options Screen */
.options-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #7c2d12 0%, #dc2626 50%, #7c3aed 100%);
    background-size: 400% 400%;
    animation: optionsGradient 7s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    color: white;
}

@keyframes optionsGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.options-content {
    max-width: 600px;
    width: 90%;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 40px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.options-content h2 {
    font-size: 36px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.options-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.option-group label {
    font-size: 18px;
    font-weight: bold;
}

.option-group input {
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.option-group input[type="text"]::placeholder {
    color: rgba(255,255,255,0.7);
}

.export-btn, .import-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 15px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.export-btn:hover, .import-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Pause Menu */
.pause-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    backdrop-filter: blur(10px);
}

.pause-content {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: white;
}

.pause-content h2 {
    font-size: 32px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pause-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.pause-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Floating Pause Button */
.floating-pause-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    border: none;
    color: white;
    padding: 15px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-pause-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

/* Angry Gubby Modal */
.angry-gubby-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6000;
    animation: redFlash 0.5s ease-in-out;
}

@keyframes redFlash {
    0%, 100% { background: rgba(0,0,0,0.8); }
    50% { background: rgba(255,0,0,0.8); }
}

.angry-gubby-content {
    text-align: center;
    animation: shake 0.5s ease-in-out infinite;
}

.angry-gubby-image {
    width: 200px;
    height: 200px;
    filter: hue-rotate(0deg) brightness(1.5) contrast(1.5);
    animation: angryShake 0.2s ease-in-out infinite;
}

@keyframes angryShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-10px) rotate(-5deg); }
    75% { transform: translateX(10px) rotate(5deg); }
}

.angry-speech-bubble {
    background: #ff0000;
    border: 3px solid #fff;
    border-radius: 20px;
    padding: 20px 30px;
    margin-top: -20px;
    position: relative;
    font-weight: bold;
    color: white;
    font-size: 24px;
    animation: wiggle 0.3s ease-in-out infinite;
}

.angry-speech-bubble::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border: 12px solid transparent;
    border-bottom-color: #fff;
}

.angry-speech-bubble::after {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    border: 9px solid transparent;
    border-bottom-color: #ff0000;
}

.sorry-btn {
    background: #fff;
    border: 3px solid #ff0000;
    color: #ff0000;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.sorry-btn:hover {
    background: #ff0000;
    color: white;
}

/* Konami Chaos */
.konami-chaos {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff, #ffff00);
    background-size: 400% 400%;
    animation: chaosGradient 1s ease-in-out infinite;
    z-index: 7000;
    overflow: hidden;
}

@keyframes chaosGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.chaos-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 10;
}

.chaos-message h1 {
    font-size: 48px;
    animation: chaosText 0.5s ease-in-out infinite;
}

.chaos-message p {
    font-size: 24px;
    margin: 10px 0;
}

@keyframes chaosText {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.dancing-gubbies {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.dancing-gubby {
    position: absolute;
    width: 60px;
    height: 60px;
    animation: dance 1s ease-in-out infinite;
}

@keyframes dance {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.2); }
    50% { transform: rotate(180deg) scale(0.8); }
    75% { transform: rotate(270deg) scale(1.2); }
}

.coolkidd-gif {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: auto;
    z-index: 10;
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #333;
    padding: 15px 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 5000;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: notificationSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes notificationSlide {
    0% { 
        right: -400px; 
        transform: rotateY(90deg);
    }
    100% { 
        right: 20px; 
        transform: rotateY(0deg);
    }
}

.achievement-notification.show {
    right: 20px;
}

.achievement-icon {
    font-size: 32px;
}

.achievement-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 14px;
    opacity: 0.8;
}

.chrome-browser {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    box-shadow: inset 0 0 100px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Chrome Header */
.chrome-header {
    display: flex;
    justify-content: space-between;
    background: #2d2e30;
    border-bottom: 1px solid #3c4043;
    padding: 8px;
}

.chrome-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #35363a;
    padding: 8px 16px;
    border-radius: 8px 8px 0 0;
    color: #e8eaed;
    font-size: 13px;
    min-width: 200px;
    position: relative;
}

.tab.active {
    background: #202124;
}

.tab-icon {
    font-size: 16px;
}

.tab-close {
    margin-left: auto;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 50%;
}

.tab-close:hover {
    background: #5f6368;
}

.tab-add {
    color: #9aa0a6;
    font-size: 18px;
    padding: 4px 8px;
    cursor: pointer;
}

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

.control-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0a6;
    cursor: pointer;
    border-radius: 50%;
}

.control-btn:hover {
    background: #5f6368;
}

.control-btn.close:hover {
    background: #f28b82;
}

/* Chrome Toolbar */
.chrome-toolbar {
    display: flex;
    align-items: center;
    background: #202124;
    padding: 8px 16px;
    gap: 16px;
    border-bottom: 1px solid #3c4043;
}

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

.nav-btn {
    background: none;
    border: none;
    color: #9aa0a6;
    font-size: 16px;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.nav-btn:hover {
    background: #3c4043;
}

.address-bar {
    flex: 1;
    background: #3c4043;
    border-radius: 20px;
    padding: 8px 16px;
    color: #e8eaed;
    font-size: 14px;
}

.url {
    color: #8ab4f8;
}

.chrome-menu {
    color: #9aa0a6;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
}

.chrome-menu:hover {
    background: #3c4043;
}

/* Game UI */
.game-ui {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px;
    pointer-events: none;
}

.ui-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    color: #ffd700;
    font-weight: bold;
    font-size: 18px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.gubby-coin-icon {
    width: 24px;
    height: 24px;
}

.timer-display {
    background: rgba(220, 38, 38, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 18px;
    animation: pulse 1s infinite;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.level-display {
    text-align: center;
    color: #e8eaed;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 16px;
    margin: 0 auto;
    width: fit-content;
}

/* Content Area */
.chrome-content {
    flex: 1;
    background: #fff;
    overflow-y: auto;
    padding: 20px;
    margin-top: 60px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.article-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid rgba(148, 163, 184, 0.3);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.article-card:hover::before {
    left: 100%;
}

.article-card:hover {
    box-shadow: 0 4px 8px rgba(60, 64, 67, 0.3);
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

.article-card.correct {
    border-color: #34a853;
    background: #e8f5e8;
}

.article-card.wrong {
    border-color: #ea4335;
    background: #fce8e6;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.article-title {
    font-size: 18px;
    font-weight: 500;
    color: #1a73e8;
    margin-bottom: 8px;
    line-height: 1.3;
}

.article-url {
    color: #5f6368;
    font-size: 12px;
    margin-bottom: 8px;
}

.article-snippet {
    color: #3c4043;
    font-size: 14px;
    line-height: 1.4;
}

/* Gubby Popup */
.gubby-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gubby-popup.show {
    transform: translate(-50%, -50%) scale(1);
}

.gubby-image {
    width: 120px;
    height: 120px;
    animation: bounce 0.6s ease;
}

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

.gubby-speech-bubble {
    background: #fff;
    border: 3px solid #333;
    border-radius: 20px;
    padding: 12px 20px;
    margin-top: -10px;
    position: relative;
    font-weight: bold;
    color: #333;
    font-size: 16px;
    animation: wiggle 0.5s ease;
}

.gubby-speech-bubble::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-bottom-color: #333;
}

.gubby-speech-bubble::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-bottom-color: #fff;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

/* Game Over Screen */
.game-over {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.game-over-content {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.game-over-content h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.final-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 30px;
}

.final-score img {
    width: 40px;
    height: 40px;
}

.next-level-btn, .restart-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin: 0 8px;
    transition: background 0.2s ease;
}

.next-level-btn:hover, .restart-btn:hover {
    background: #1557b0;
}

.restart-btn {
    background: #ea4335;
}

.restart-btn:hover {
    background: #d73527;
}

/* Difficulty Selection */
.difficulty-select {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.difficulty-content {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.difficulty-content h1 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #333;
}

.difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.difficulty-btn {
    background: #f8f9fa;
    border: 2px solid #dadce0;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.difficulty-btn:hover {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.hidden {
    display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .chrome-header {
        padding: 4px;
    }
    
    .tab {
        min-width: 150px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .chrome-toolbar {
        padding: 4px 8px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .game-ui {
        padding: 8px;
    }
    
    .gubby-image {
        width: 80px;
        height: 80px;
    }
    
    .gubby-speech-bubble {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .title-text {
        font-size: 32px;
    }
    
    .menu-btn {
        min-width: 200px;
        font-size: 16px;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

/* Shop Screen */
.shop-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #48dbfb 100%);
    background-size: 400% 400%;
    animation: shopGradient 6s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    color: white;
}

@keyframes shopGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.shop-content {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 30px;
    backdrop-filter: blur(15px);
    overflow-y: auto;
}

.shop-content h2 {
    font-size: 40px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background: linear-gradient(45deg, #fff, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.coin-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 15px;
    padding: 15px;
    width: fit-content;
    margin: 0 auto 30px auto;
}

.shop-categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn.active {
    background: rgba(255,255,255,0.4);
    border-color: rgba(255,255,255,0.6);
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.shop-item {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.shop-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.shop-item:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(20px, 20px);
}

.shop-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.shop-item.owned {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.2);
}

.shop-item-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.shop-item-name {
    font-size: 18px;
    font-weight: bold;
}

.shop-item-description {
    font-size: 14px;
    opacity: 0.8;
    text-align: center;
    line-height: 1.4;
}

.shop-item-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
}

.buy-btn {
    background: linear-gradient(45deg, #10b981, #059669);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.buy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.buy-btn:disabled {
    background: rgba(107, 114, 128, 0.5);
    cursor: not-allowed;
    transform: none;
}

.owned-badge {
    background: linear-gradient(45deg, #22c55e, #16a34a);
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Particle Effects */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: particle-float 6s linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}