/* 基礎樣式設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans TC', sans-serif;
}

body {
    background-color: #f5f5f7;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    margin: 0 auto;
}

/* 頁頭樣式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

#modalBackdrop {
    display: none;
}

#modalContent {
    display: none;
}

.search-container {
    margin-top: 20px;
    display: flex;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    gap: 10px;
}

#search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

#search-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#search-btn:hover {
    background-color: #2980b9;
}

/* 通告容器樣式 */
.notice-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 30px;
}

.notice-container h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.latest-notices h2 {
    color: #3498db;
}

.important-notices h2 {
    color: #e74c3c;
}

/* 通告列表樣式 */
.notice-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.notice-item {
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.notice-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}



/* CSS */
.view-btn {
  padding: 0.6em 2em;
  border: none;
  outline: none;
  color: rgb(255, 255, 255);
  background: #111;
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 10px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.view-btn:before {
  content: "";
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  -webkit-filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing-view-btn 20s linear infinite;
  transition: opacity 0.3s ease-in-out;
  border-radius: 10px;
}

@keyframes glowing-view-btn {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.view-btn:after {
  z-index: -1;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #222;
  left: 0;
  top: 0;
  border-radius: 10px;
}


.latest-notices .notice-item {
    border-left-color: #3498db;
}

.important-notices .notice-item {
    border-left-color: #e74c3c;
}

.notice-item h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.notice-item p {
    color: #666;
    margin-bottom: 5px;
}

.notice-item p:first-of-type {
    color: #888;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* PDF檢視器樣式 */
.pdf-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
}

.pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.pdf-controls button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.pdf-controls button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.pdf-controls button:hover:not(:disabled) {
    background-color: #2980b9;
}

#page-info {
    color: #333;
    font-size: 1.1rem;
}

.pdf-viewer {
    display: flex;
    justify-content: center;
    overflow: auto;
    min-height: 500px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background-color: #f9f9f9;
}



#ads {
    width: 100%; /* Fits device width */
    padding-top: 83%; /* Replace with your image’s (height/width)*100% */
    background-image: url("eClass.webp"); /* Your image path */
    background-repeat: no-repeat;
    background-size: cover; /* Fills the container without stretching */
    background-position: center; /* Centers the image */
    margin: 20px 0; /* Spacing above/below */
    position: relative; /* Ensures padding works correctly */
}

/* 響應式設計 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .notice-container {
        padding: 20px 15px;
    }
    
    .pdf-container {
        padding: 20px 15px;
    }
    
    .pdf-controls {
        flex-wrap: wrap;
    }
}
    
