@import url("https://fonts.googleapis.com/css?family=Noto+Sans+TC&display=swap");

html {
    font-family: 'Helvetica', 'Arial', 'Noto Sans TC', '黑體-繁','微軟正黑體', sans-serif !important;
}

body {
    margin: 0px;
    color: white;
    background-color: rgb(25, 25, 25);
    scroll-behavior: smooth;
}

@media (prefers-color-scheme: light) {
    body {
        color: rgb(0, 0, 0);
        background-color: rgb(230, 230, 230);
    }
}

header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: left;
    width: 100%;
    align-content: center;
    background-color: rgba(40, 40, 40, 0.7);
    padding: 0;
    position: sticky;
    top: 0;
    opacity: 100%;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 1;
    transition: all 0.3s ease;
}

@media (prefers-color-scheme: light) {
    header {
        color: black;
        background-color: rgba(255, 255, 255, 0.75);
    }
}

header.hidden {
    top: -15vh;
}

.title {
    width: max-content;
    height: auto;
    padding: 20px;
    /* text-align: center; */
    font-size: x-large;
    opacity: 100%;
    font-weight: bolder;
    /* Add these properties to prevent wrapping and show ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%; /* Adjust this value based on your layout needs */
}

.buttonList {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.item {
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    background-color: rgb(50, 50, 50);
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    padding: 10px;
    word-wrap: break-word;
    overflow: hidden;
}

@media (prefers-color-scheme: light) {
	.item {
		color: black;
		background-color: rgb(250, 250, 250);
		box-shadow: 5px 5px 10px rgba(210, 210, 210, 75%);
	}
}

.item:active {
	background-color: rgb(70, 70, 70);
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}
@media (prefers-color-scheme: light) {
	.item:active {
		background-color: #e3f2fd;
		box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
	}
}

@media (min-width: 768px) {
	.item {
		cursor: pointer;
	}
	.item:hover {
		background-color: rgb(70, 70, 70);
		box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
		transform: translateY(-2px);
	}

	@media (prefers-color-scheme: light) {
		.item:hover {
			background-color: #e3f2fd;
			box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
		}
	}
}



@media screen and (max-width: 768px) {
    .buttonList {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .buttonList {
        grid-template-columns: repeat(2, 1fr);
    }
    .item {
        font-size: 20px;
    }
}

input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

footer {
    color: #929292;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}