@font-face {
    font-family: 'MiSans';
    font-weight: normal;
    src: url(./fonts/MiSans-Regular.ttf);
}

@font-face {
    font-family: 'MiSans';
    font-weight: bold;
    src: url(./fonts/MiSans-Demibold.ttf);
}

@font-face {
    font-family: 'HarmonyOS Sans';
    font-weight: normal;
    src: url(./fonts/HarmonyOS_Sans_Regular.ttf);
}

@font-face {
    font-family: 'HarmonyOS Sans';
    font-weight: bold;
    src: url(./fonts/HarmonyOS_Sans_Medium.ttf);
}

@font-face {
    font-family: 'OPPOSans';
    font-weight: normal;
    src: url(./fonts/OPPOSans-R.ttf);
}

@font-face {
    font-family: 'OPPOSans';
    font-weight: bold;
    src: url(./fonts/OPPOSans-M.ttf);
}

@font-face {
    font-family: 'SF Pro Display';
    font-weight: normal;
    src: url(./fonts/SF-Pro-Display-Regular.otf);
}

@font-face {
    font-family: 'SF Pro Display';
    font-weight: bold;
    src: url(./fonts/SF-Pro-Display-Medium.otf);
}


body {
    -webkit-user-select: none;
    user-select: none;
    font-family: MiSans;
    transition: background-color 0.2s ease;
    background: linear-gradient(45deg, #ff0080, #ff8c00, #ffd700, #90ee90, #00ced1, #1e90ff, #c71585, #ff1493, #ffd700, #dc143c, #ffa07a);
    background-size: 2100% 2100%;
    /* 增加背景尺寸以允许更平滑的过渡 */
    animation: gradientAnimation 10s linear infinite;
}

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

    100% {
        background-position: 100% 50%;
    }
}

body.animation-off {
    animation: none;
    background: #fff;
}

body.mdui-theme-layout-dark.animation-off {
    background: #212121;
}

body.background-image {
    background: url("https://unsplash.it/1920/1080?random") no-repeat center center fixed;
    background-size: cover;
}

body.mdui-theme-layout-dark.background-image {
    background: url("https://unsplash.it/1920/1080?random") no-repeat center center fixed;
    background-size: cover;
}

.mi-sans {
    font-family: MiSans !important;
}

.harmony-sans {
    font-family: HarmonyOS Sans !important;
}

.oppo-sans {
    font-family: OPPOSans !important;
}

.sf-pro {
    font-family: SF Pro Display !important;
}

.mdui-select {
    font-family: MiSans;
}

h1 {
    font-weight: bold;
}

.preview-dialog .mdui-dialog-content {
    padding: 0;
}

@media (min-width: 600px) {
    :root {
        height: 100%;
    }

    body {
        height: 100%;
        overflow: hidden;
    }

    .mdui-container,
    #main-flex,
    #photo-col {
        height: 100%;
    }

    #photo-col {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        border-right: none;
        flex: 1;
        height: auto;
        max-height: 100%;
        padding: 16px;
    }

    #photo-container {
        text-align: center;
    }

    #photo-area {
        width: 570px;
        height: 690px !important;
        max-height: none;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #ccc;
        border-radius: 24px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        padding: 16px;
        background-color: #fff;
        transition: background-color 0.2s ease;
    }

    #photo-tip {
        text-align: center;
        color: #777;
    }

    #photo-info {
        text-align: center;
        color: #777;
    }

    #photo-canvas-div {
        height: auto;
        width: auto;
        max-width: 800px;
        max-height: 800px;
        border: 1px solid #ccc;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        background-color: #fff;
    }

    #info-col {
        border: 1px solid #ccc;
        border-radius: 24px;
        padding: 16px;
        margin-top: 0;
        margin-bottom: 0;
        margin-right: 0;
        height: auto;
        max-height: 80%;
        overflow-y: auto;
        background-color: #fff;
        opacity: 0.85;
    }

    body.mdui-theme-layout-dark #info-col {
        background-color: #333;
    }

    .mdui-snackbar-right-top {
        -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12) !important;
        box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12) !important;

        border-radius: 6px;
    }

    #main-flex {
        height: 100%;
        display: flex;
        align-items: center;
    }

    #photo-col,
    #info-col {
        flex: 1;
        height: auto;
        max-height: 80%;
        padding: 16px;
        box-sizing: border-box;
    }
}

.mdui-slider {
    padding: 10px 0;
    margin-bottom: 0;
}

#theme-toggle {
    z-index: 1000;
}

.mdui-theme-transition {
    transition: background-color 0.2s ease;
}

.mdui-float-right button {
    margin-left: 8px;
}

div.aplayer-body {
    left: 20px !important;
    bottom: 20px !important;
}

#theme-container {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 40px;
    overflow: hidden;
    padding: 10px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(201, 201, 201, 0.3);
    border: 1px solid #616161;
}


#theme-container button {
    margin: 0 10px;
}


#frame-type {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 40px;
    overflow: hidden;
    padding: 10px;
    position: fixed;
    top: 20px;
    left: 50%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(201, 201, 201, 0.3);
    border: 1px solid #616161;
}

#frame {
    margin: 0 10px;
}