/* General styling */ * { margin: 0; padding: 0; box-sizing: border-box; } body, html { height: 100%; font-family: Arial, sans-serif; } /* Title styling (hidden on desktop by default) */ .game-title { display: none; font-family: 'Fredoka', 'Comfortaa', Arial, sans-serif; font-weight: 700; text-align: center; color: #ffffff; text-shadow: 0 0 8px #ff0000, 0 0 16px #ff0000; margin-bottom: 40px; } /* Background image for the welcome screen (Desktop only) */ /* Default (Desktop) */ .welcome-screen { background-image: url('assets/background.png'); background-size: cover; background-position: center; background-repeat: no-repeat; height: 100vh; width: 100vw; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; } /* Button container styling */ .button-container { display: flex; flex-direction: column; align-items: center; } /* Default button sizes for desktop */ .image-button { background: url('assets/button-image.png') no-repeat center center; background-size: contain; border: none; width: 230px; height: 100px; cursor: pointer; margin-top: 70px; display: block; transition: transform 0.3s ease, box-shadow 0.3s ease; } #how-to-play-btn { background: url('assets/How_to_play.png') no-repeat center center; background-size: contain; width: 316px; height: 101px; } /* Hover effect */ .image-button:hover { transform: scale(1.1); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4); } /* ========================= */ /* RESPONSIVENESS */ /* ========================= */ /* --- Tablets (landscape & portrait) --- */ @media (max-width: 1024px) { .welcome-screen { background-image: none !important; background: linear-gradient(135deg, #000000 0%, #1a001a 100%) !important; background-attachment: fixed !important; background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important; } .game-title { display: block; font-size: 2.3rem; margin-top: -40px; } .image-button { width: 200px; height: 100px; margin-top: 70px; } #how-to-play-btn { width: 250px; height: 80px; margin-top: 7px; } } /* --- Large mobiles (portrait) --- */ @media (max-width: 768px) { .welcome-screen { background-image: none !important; background: linear-gradient(135deg, #000000 0%, #1a001a 100%) !important; background-attachment: fixed !important; background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important; } .game-title { display: block; font-size: 2rem; margin-top: -10px; padding: 0 20px; } .image-button { width: 170px; height: 70px; margin-top: 50px; } #how-to-play-btn { width: 230px; height: 75px; } } /* --- Small mobiles --- */ @media (max-width: 480px) { .welcome-screen { background-image: none !important; background: linear-gradient(135deg, #000000 0%, #1a001a 100%) !important; background-attachment: fixed !important; background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important; } .game-title { display: block; font-size: 1.6rem; line-height: 1.3; margin-top: 40px; padding: 0 25px; } .image-button { width: 140px; height: 60px; margin-top: 60px; } #how-to-play-btn { width: 190px; height: 65px; } } /* --- Landscape Warning for Phones --- */ @media screen and (orientation: landscape) and (max-width: 1024px) { body::before { content: "Please rotate your device to portrait mode 📱"; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 1); color: #fff; font-size: 1.4rem; font-family: 'Comfortaa', sans-serif; display: flex; justify-content: center; align-items: center; text-align: center; z-index: 99999; padding: 20px; box-sizing: border-box; } }