ccdp10003-project01/styles.css

137 lines
2.5 KiB
CSS

:root {
--border-radius: 12px;
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
--foreground-rgb: 255, 255, 255;
--background-rgb: 10, 10, 10;
--callout-rgb: 238, 240, 241;
--callout-border-rgb: 172, 175, 176;
--card-rgb: 180, 185, 188;
--card-border-rgb: 131, 134, 135;
}
* {
margin: 0;
padding: 0;
}
body {
color: rgb(var(--foreground-rgb));
background: rgb(var(--background-rgb));
}
main {
display: flex;
flex-direction: column;
align-items: center;
}
.centre {
margin: 40vh 0;
display: flex;
flex-direction: column;
align-items: center;
}
.centre #begin {
background: rgb(var(--card-rgb));
border: 1px solid rgb(var(--card-border-rgb));
border-radius: var(--border-radius);
padding: 1rem 1.2rem;
transition: background 200ms, border 200ms;
width: 75%;
}
.centre #beginOff {
visibility: none;
opacity: 0;
transition: visibility 0.5s, opacity 0.5s linear;
background: rgb(var(--card-rgb));
border: 1px solid rgb(var(--card-border-rgb));
border-radius: var(--border-radius);
padding: 1rem 1.2rem;
width: 75%;
}
.headphonesOff {
visibility: visible;
opacity: 0;
transition: display 2s, opacity 2s linear;
display: inherit;
flex-direction: inherit;
align-items: center;
}
.headphonesOn {
visibility: visible;
opacity: 1;
transition: opacity 2s linear;
display: inherit;
flex-direction: inherit;
align-items: center;
}
#headphonesImage {
height: 100px;
width: 100px;
margin-bottom: 10px;
}
footer {
position: fixed;
width: 100%;
bottom: 5dvh;
display: flex;
justify-content: space-evenly;
align-items: center;
}
footer section {
justify-self: center;
}
#credits {
text-align: right;
}
#creditsOff {
visibility: none;
opacity: 0;
transition: visibility 0.3s, opacity 0.3s linear;
}
.controlButtonOff {
visibility: none;
opacity: 0;
}
.controlButtonOn {
visibility: visible;
opacity: 1;
transition: opacity 2s linear;
border-radius: var(--border-radius);
background: none;
border: none;
cursor: pointer;
}
.controlImage {
height: 50px;
width: 50px;
}
/* Enable hover only on non-touch devices */
@media (hover: hover) and (pointer: fine) {
.centre #button:hover {
background: rgba(var(--card-rgb), 0.7);
border: 1px solid rgba(var(--card-border-rgb), 0.7);
}
}
@media (prefers-reduced-motion) {
.centre #button:hover {
transform: none;
}
}