/* 不会写css 直接ai */

:root {
    --bg-color: #121212;
    --panel-bg: #1e1e1e;
    --input-bg: #2c2c2c;
    --text-main: #ececec;
    --text-sub: #a0a0a0;
    --accent-color: #23ADE5;
    --border-color: #333;
    --danger-color: #e54d42;
}

* {
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-color);
    margin: 0;
    font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    overflow: hidden;
}

.container1 {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.left {
    flex: 1;
    background-color: #000;
    background-image: radial-gradient(#222 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
    position: relative;
    flex-wrap: wrap;
    gap: 20px;
}

canvas {
    width: 295px;
    height: 590px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    /*transition: transform 0.3s ease;*/
    background: #000;
}


@media (hover: hover) {
    canvas:hover {
        /*transform: translateY(-5px);*/
    }
}


.right {
    width: 720px;
    min-width: 350px;
    background-color: var(--panel-bg);
    padding: 30px;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    border-left: 1px solid var(--border-color);
    padding-bottom: 50px; /* 底部留白 */
}


.right::-webkit-scrollbar {
    width: 6px;
}

.right::-webkit-scrollbar-track {
    background: var(--panel-bg);
}

.right::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}


h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    letter-spacing: 1px;
}

h3 {
    font-size: 0.95rem;
    color: var(--accent-color);
    margin-top: 30px;
    margin-bottom: 15px;
    text-transform: uppercase;
    border-left: 3px solid var(--accent-color);
    padding-left: 8px;
}


.container2 {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}


.container2 > div {
    flex: 1;
    min-width: 100%;
}

@media (min-width: 1400px) {
    .container2 > div {
        min-width: 45%;
    }
}

label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 8px;
    margin-top: 15px;
}

input[type="text"], select, input[type="file"] {
    width: 100%;
    padding: 12px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: white;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus, select:focus {
    border-color: var(--accent-color);
}


input[type="color"] {
    width: 100%;
    height: 44px; /* 增加高度 */
    border: none;
    padding: 0;
    background: none;
    border-radius: 4px;
    cursor: pointer;
}


.radio-group {
    display: flex;
    gap: 15px;
    background: var(--input-bg);
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.radio-group label {
    margin: 0;
    display: flex;
    align-items: center;
    color: var(--text-main);
}

.radio-group input {
    margin-right: 8px;
    transform: scale(1.2);
}

button {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

#shuaXin {
    background-color: var(--accent-color);
    color: #fff;
}

#shuaXin:active {
    background-color: #1a96c7;
    transform: scale(0.98);
}

#chongZhi {
    background: transparent;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

#chongZhi:active {
    background: rgba(229, 77, 66, 0.1);
}

#exportPNG1, #exportPNG2 {
    background-color: #eee;
    color: #111;
    margin-bottom: 8px;
}

#exportPNG1:active, #exportPNG2:active {
    background-color: #ccc;
}

#lianXi, #github {
    background-color: #333;
    color: #aaa;
}

@media (max-width: 900px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .container1 {
        flex-direction: column;
        height: auto;
        width: 100%;
    }

    .left {
        width: 100%;
        height: auto;
        padding: 30px 10px;
        flex-shrink: 0;
        background-size: 15px 15px;
        gap: 30px;
    }

    canvas {

        max-width: 90vw;
        height: auto;
        aspect-ratio: 295/590;
    }

    .right {
        width: 100%;
        height: auto;
        overflow: visible;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding: 20px 15px 60px 15px;
    }

    h2 {
        font-size: 1.1rem;
        text-align: center;
    }

    input[type="text"], select {
        font-size: 16px;
    }

    button:active {
        opacity: 0.8;
    }
}