:root {
    --white: #e1e1e1;
    --black: #333;
}

body {
    margin: 0;
    background-color: #000f3c;
    color: var(--white);
}


* {
    box-sizing: border-box;
}

header {
    width: max-content;
    background-color: rgb(0, 92, 221);
    clip-path: polygon(0 0, 100% 0%, 80% 100%, 0% 100%);
    padding: .5em 2.5em .5em 1em;
}

header h1 {
    font-size: 1.5em;
    margin: 0;
    color: var(--white);
    width: max-content;
}

header .author {
    font-size: .8em;
}

.dateTime {
    position: absolute;
    top: 10px;
    right: 15px;
    text-align: right;
    font-size: .9em;
}

.highlight {
    font-weight: bold;
    font-size: 1.2em;
    margin: 0 1px;
}

.hidden {
    display: none;
    visibility: hidden;
}

.timer {
    height: fit-content;
    width: 250px;
    height: 250px;
    cursor: pointer;
    position: relative;
    margin: 30px auto;

    .circle {
        position: absolute;
        left: 0;
        top: 0;
        width: 250px;
        height: 250px;
        border-radius: 50%;
        /* JSで動的に変更 */
        background-image: conic-gradient(#799aff 0deg 0deg, #333 0deg 360deg);
    }
    
    .circle_break {
        position: absolute;
        left: 10px;
        top: 10px;
        width: 230px;
        height: 230px;
        border-radius: 50%;
        /* JSで動的に変更 */
        background-image: conic-gradient(#ff6060 0deg 0deg, #505050 0deg 360deg);
    }
    
    div.center {
        position: absolute;
        top: 5%;
        bottom: 0;
        width: 100%;
        height: max-content;
        margin: auto;
        text-align: center;
    }
    
    div.circle_break::before {
        position: absolute;
        content: "";
        top: 10px;
        left: 10px;
        width: 210px;
        height: 210px;
        background-color: #000f3c;
        border-radius: 50%;
    }
    
    .timer_container {
        color: var(--white);
        width: 100%;
        text-align: center;
        position: absolute;
        top: 40px;
    
        .minutes {
            font-size: 80px;
            line-height: 80px;
        }
    
        .seconds {
            font-size: 30px;
        }
    }

}

.timer_status__text {
    display: inline-block;
    padding: .5em;
    margin: .5em 0;
    border-top: .1em solid var(--white);
    border-bottom: .1em solid var(--white);
}

.timer_status__text.restart {
    background-color: #2c5cec;
    width: 5em;
    color: var(--white);
    border-radius: 1em;
    border: none;
}

.timer_status__text.pause {
    background-color: #ff4545;
    width: 5em;
    color: var(--white);
    border-radius: 1em;
    border: none;
}

.settings {
    margin: 30px auto;
    text-align: center;
    width: max-content;
}

.settings input {
    width: 80px;
    padding: 5px 10px;
    border-radius: 10px;
    margin-left: 10px;
    font-size: 1em;
}

.exam {
    position: absolute;
    right: 10%;
    top: 50%;
    background-color: #182c68;
    padding: 20px;
    width: 40%;

    input {
        width: 5em;
        padding: .5em;
        border-radius: 10px;
        margin-left: 10px;
    }
}

.stopWatch {
    background-color: #182c68;
    padding: 15px;
    min-width: 300px;
    width: max-content;
    max-width: 80%;
    border-radius: 20px;
    margin: 40px auto;

    .stopWatch__container {
        display: flex;
        justify-content: space-around;
        align-items: center;
        flex-direction: column;
        row-gap: 5px;
    }

    .stopWatch__container__screen {
        font-size: 1.5em;
        padding: 5px 0;
        letter-spacing: 1px;

        .char {
            font-size: .6em;
            vertical-align: top;
        }
    }

    .stopWatch__container__buttons {
        display: flex;
        justify-content: space-between;
        align-items: center;
        column-gap: 5px;

        button {
            color: white;
            cursor: pointer;
            border: none;
            outline: none;
            border-radius: 20px;
            padding: 10px;
        }

        button:disabled {
            opacity: .5;
        }

        .start {
            background-color: #2c5cec;
        }

        .pause {
            background-color: #ff4545;
        }

        .reset {
            background-color: #636363;
        }
    }

}

button {
    padding: 10px 5px;
}

input:disabled {
    color: var(--white);
}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 0;
    width: 100%;

    button {
        width: 100%;
        height: 60px;
        max-height: 10vh;
    }
}

.notification {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #ffffff84;
    z-index: 1000;
    opacity: 0;
}

.notification.active {
    animation: notificationBackground .8s ease-in-out forwards;
}

@keyframes notificationBackground {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.notification.hidden {
    top: 0%;
}

.notification .message_container {
    position: absolute;
    top: 20%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 80%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgb(30, 30, 30);
    border-radius: 50px;
    padding: 1em;
    text-align: center;
    z-index: 101;
    box-shadow: 5px 10px 15px #000f3c9f;
    column-gap: .5em;
    row-gap: .5em;

    button {
        padding: 10px 20px;
    }
}

.notification.active .message_container {
    animation: notification_message 2s ease-in-out forwards;
}

@keyframes notification_message {
    from {
        top: -15%;
    }

    50% {
        top: 15%;
    }

    to {
        top: 10%;
    }
}

.notification button {
    padding: 10px;
    background-color: rgb(80, 80, 80);
    color: var(--white);
    border: 0;
    font-size: 1em;
    border-radius: 30px;
}

.popup {
    position: absolute;
    width: 80%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgb(30, 30, 30);
    border: 4px solid #5c76c5;
    padding: 1em;
    z-index: 100;
    border-radius: 50px;
    display: none;
}

.popup.active {
    display: block;
    animation: popup 1s ease-out forwards;
}

@keyframes popup {
    from {
        top: -10%;
    }

    to {
        top: 50%;
    }
}

.popup__message {
    text-align: center;
    margin: 1em 0;
}

.popup__buttons {
    display: flex;
    justify-content: space-evenly;
    align-items: center;

    button {
        width: 6em;
        font-size: 1em;
        border-radius: 20px;
    }

    #popup_yes,
    #popup_no {
        color: var(--white);
    }

    #popup_yes {
        background-color: #4271ff;
    }

    #popup_no {
        background-color: #ff4949;
    }
}

.musicSelector {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #1a1a1ab0;
    z-index: 300;
}

.musicSelector__content {
    position: absolute;
    width: 80%;
    max-width: 500px;
    height: 80%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    background-color: #333;
    border-radius: 10px;
    padding: 10px;
    overflow-y: auto;
}

.musicSelector__content__header {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid var(--white);

    h2 {
        margin: .5em 0;
        text-align: center;
    }
}

.screenCloseButton {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #333;
    border-top: 2px solid #555;
    border-left: 2px solid #555;
    border-right: 2px solid #222;
    border-bottom: 2px solid #222;
}

.screenCloseButton::before,
.screenCloseButton::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 21px;
    background: #fff;
    /* バツ印の色 */
}

.screenCloseButton::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.screenCloseButton::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.musicSelector__content__list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid var(--white);

    h3 {
        margin: .5em 0;
        text-align: center;
    }
}

.musicSelector__content__footer {
    position: relative;
    padding: 10px;
    text-align: center;
}

@media screen and (max-height: 600px) {
    
}

@media (orientation: landscape) {
    .timer {
        position: absolute;
        top: 45%;
        left: 25%;
        transform: translateX(-50%) translateY(-50%);
        height: fit-content;
        width: 250px;
        height: 250px;
        cursor: pointer;
    }

    .settings {
        position: absolute;
        left: 75%;
        top: 25%;
        transform: translateX(-50%) translateY(-50%);
        text-align: center;
        width: max-content;
    }

    .settings input {
        width: 5em;
        padding: .5em;
        border-radius: 10px;
        margin-left: 10px;
    }

    .stopWatch {
        position: absolute;
        top: 55%;
        right: 30%;
        transform: translateX(50%) translateY(-50%);
    }
}