* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/img/icons/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.3;
    z-index: 0;
}
body {
    min-height: 100vh;
    background: linear-gradient(to bottom, 
        #46a3a38a, 
        rgba(70, 170, 221, 1)      
    );
    font-family: Arial, sans-serif;
    position: relative;
    overflow-x: hidden; /* 防止水平滾動 */
}

.header {
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    align-items: center;
    position: relative;
    z-index: 1;
}

.logo img {
    width: 150px;
    height: auto;
}

.header-icons {
    display: flex;
    gap: 1.5rem;
}

.header-icons img {
    width: 24px;
    height: 24px;
}

.component-label {
    color: #E0F2F1;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.socket-icon {
    position: absolute; /* 改為絕對定位 */
    top: calc(20% - 70px); /* 調整垂直位置 */
    left: 50%; /* 水平置中 */
    transform: translateX(-50%); /* 確保水平置中 */
    margin-bottom: 0; /* 移除原有的 margin */
    z-index: 1; /* 確保在登入卡片上層 */
}
.socket-icon img {
    /* 使用viewport width單位 */
    width: 15vw; /* 視窗寬度的15% */
    min-width: 80px; /* 最小不小於80px */
    max-width: 150px; /* 最大不超過120px */
    height: auto; /* 保持圖片比例 */
    object-fit: contain;
}


.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #E0E0E0;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

.sign-in-button {
    width: 100%;
    padding: 0.75rem;
    background: #333;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    margin: 0.5rem 0 1rem;
    font-size: 0.9rem;
}

.sign-in-button:hover {
    background: #444;
}

.forgot-password {
    text-align: center;
}

.forgot-password a {
    color: #333;
    text-decoration: none;
    font-size: 0.8rem;
}

.footer {
    text-align: center;
    color: white;
    padding: 1rem;
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 1;
}

.copyright {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.company-name {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}



/* 保持主容器居中 */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* 讓內容能夠垂直置中 */
    padding: 2rem 1rem; /* 增加 padding 來適應不同大小 */
    position: relative;
    z-index: 1;
}

/* 修正登入卡片的響應式 */
.login-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    width: 90%; /* 讓小螢幕有更好的適應性 */
    max-width: 400px; /* 最大寬度 */
    min-width: 250px; /* 避免過小 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.google-login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px;
    border: 1px solid #4285F4;
    background-color: #fff;
    color: #4285F4;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 8px;
}

.google-icon {
    margin-right: 8px;
}
.google-login-button:hover {
  background-color: #efeeee;
}

.apple-login-button {
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  font-weight: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  width: 100%;
  margin-bottom: 8px;
}

.apple-login-button i {
  font-size: 20px;
  margin-right: 10px;
}

.apple-login-button:hover {
  background-color: #333;
}


/* 小螢幕適應 */
@media screen and (max-width: 480px) {
    .socket-icon img {
        width: 25vw;
    }
    .socket-icon {
        top: 20%; /* 調整位置以適應小螢幕 */
    }
    .login-card {
        width: 95%;
        max-width: 300px;
        min-width: 200px;
    }
}

/* 中等螢幕 */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .socket-icon img {
        width: 20vw;
    }
    .login-card {
        width: 85%;
        max-width: 350px;
    }
}

/* 桌機版 */
@media screen and (min-width: 769px) {
    .socket-icon img {
        width: 15vw;
    }
    .login-card {
        width: 60%;
        max-width: 400px;
    }
}
