:root {
    --primary-color: #4d75a2;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --highlight-color: #4d75a2;

    --input-color: #7184af;
    --input-border: #CDD9ED;
    --input-background: #fff;
    --input-placeholder: #969aa1;

    --input-border-focus: #4d75a2;

    --group-color: var(--input-color);
    --group-border: var(--input-border);
    --group-background: #EEF4FF;

    --group-color-focus: #fff;
    --group-border-focus: var(--input-border-focus);
    --group-background-focus: #4d75a2;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

header {
    position: sticky;
    top: 0;
    background-color: #fff; /* 或者您想要的背景顏色 */
    z-index: 1000; /* 確保它在其他元素之上 */
    padding: 10px 20px; /* 根據需要調整內邊距 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 添加一些陰影效果 */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 10px;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

nav {
    display: flex;
    align-items: center;
}

.nav-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: bold;
}

.nav-btn:hover {
    background-color: #6b91c0;
    transform: translateY(-2px);
}

.welcome-page {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
}

.welcome-content {
    text-align: center;
    margin-bottom: 50px;
}

h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.highlight {
    color: var(--highlight-color);
    font-weight: 700;
}

p {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.feature {
    text-align: center;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    width: 250px;
}

.feature:hover {
    transform: translateY(-10px);
}

.feature-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.feature h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.feature p {
    font-size: 16px;
    color: #666;
}

@media (max-width: 768px) {
    body.home-page {
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .home-page header {
        position: sticky;
        padding: 10px 12px;
    }

    .home-page .logo-img {
        width: 36px;
        height: 36px;
    }

    .home-page .nav-btn {
        padding: 9px 14px;
        margin-left: 6px;
        font-size: 14px;
    }

    .home-page .welcome-page {
        display: block;
        padding: 36px 16px;
    }

    .home-page .welcome-content {
        margin-bottom: 28px;
    }

    .home-page h1 {
        margin-top: 0;
        font-size: clamp(30px, 10vw, 38px);
        line-height: 1.35;
    }

    .home-page .welcome-content p {
        margin-bottom: 0;
        font-size: 16px;
    }

    .home-page .features {
        gap: 18px;
    }

    .home-page .feature {
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }

    header {
        padding: 20px;
    }

    h1 {
        font-size: 36px;
    }

    .features {
        flex-direction: column;
        align-items: center;
    }

    .feature {
        width: 100%;
        max-width: 300px;
    }
}

/* 其他樣式... */

@media (max-width: 768px) {
    .notes-container {
        flex-direction: column;
    }

    .note-list, .smart-tools {
        width: 100%;
        height: auto;
    }

    .toolbar {
        overflow-x: auto;
    }
}

/* 在文件末尾添加以下樣式 */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.auth-form {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    width: 320px; /* 稍微減少寬度 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-form form {
    width: 100%; /* 確保表單佔滿整個容器寬度 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-group {
    position: relative;
    margin-bottom: 25px;  /* 增加下邊距，給提示文字留出空間 */
    width: 100%;
    display: flex;
    justify-content: center;
}

.input-group i {
    position: absolute;
    left: 30px; 
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 2;
}

.input-group input {
    width: 100%;
    max-width: 280px;
    padding: 12px 12px 12px 40px; /* 增加左側 padding */
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    background-color: #fff;
}


/* 新增樣式來建立圖標背景 */
.input-group::before {
    content: '';
    position: absolute;
    left: calc(50% - 140px);
    top: 1px;
    bottom: 1px;
    width: 30px; 
    background-color: #d9d9d9;
    border-radius: 4px 0 0 4px;
    z-index: 1;
    pointer-events: none;
}

.form-field {
    display: block;
    width: 100%;
    padding: 8px 16px;
    line-height: 25px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    border-radius: 6px;
    color: var(--input-color);
    border: 1px solid var(--input-border);
    background: var(--input-background);
    transition: border 0.3s ease;
}

.form-field::placeholder {
    color: var(--input-placeholder);
}

.form-field:focus {
    outline: none;
    border-color: var(--input-border-focus);
}


.form-group {
    position: relative;
    display: flex;
    width: 100%;
    & > span,
    .form-field {
        white-space: nowrap;
        display: block;
        &:not(:first-child):not(:last-child) {
            border-radius: 0;
        }
        &:first-child {
            border-radius: 6px 0 0 6px;
        }
        &:last-child {
            border-radius: 0 6px 6px 0;
        }
        &:not(:first-child) {
            margin-left: -1px;
        }
    }
    .form-field {
        position: relative;
        z-index: 1;
        flex: 1 1 auto;
        width: 1%;
        margin-top: 0;
        margin-bottom: 0;
    }
    & > span {
        text-align: center;
        padding: 8px 12px;
        font-size: 14px;
        line-height: 25px;
        color: var(--group-color);
        background: var(--group-background);
        border: 1px solid var(--group-border);
        transition: background .3s ease, border .3s ease, color .3s ease;
    }
    &:focus-within {
        & > span {
            color: var(--group-color-focus);
            background: var(--group-background-focus);
            border-color: var(--group-border-focus);
        }
    }
}

.auth-button {
    width: 80%; /* 增加按鈕寬度 */
    max-width: 280px; /* 與輸入框保持一致 */
    padding:12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 20px auto 0; /* 增加上邊距 */
    display: block; /* 確保 margin: 0 auto 生效 */
}

.auth-button:hover {
    background-color: #555;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.hintstyle{
    font-size: 12px;
    color: rgb(167, 0, 0);
    margin-top: 2px;
    margin-bottom: 5px;
    height: 20px;
    text-align: left;
    
    align-self: flex-start;
      /* 調整左邊距 */
    width: 100%;        /* 確保寬度足夠 */
    position: relative; /* 添加相對定位 */
    z-index: 10;       /* 確保顯示在最上層 */
}

dialog{
    border: none;
    height: 200px;
    width: 300px;
    color: #6b91c0;
    font-weight: bold;
    box-shadow: 0 2px 6px #ccc;
    border-radius: 10px;
    text-align: center;
}
dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.1);
}

.dialogbtn{
    margin-top: 10px;
    margin-right: 10px;
    margin-left: 10px;
    border: 0;
    text-align: center;
    width: 85px;
    height: 35px;
    border-radius: 10px;
    background-color: #aaaaaa;
    color: #fff;
    font-size: 16px;
}.dialogbtn:hover{
    background-color: #aaaaaae8;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transform: translateY(-1px);  
}

.dialogtext{
    font-size: 18px;
    text-align: center;
    margin-top: 60px;
}

.goin{
    background-color: #6b91c0;
}.goin:hover{
    background-color: #6083ad;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}
