/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f2f4f7;
  color: #333;
  padding-bottom: 60px;
}

/* Header */
.mobile-header {
  background-color: #2f80ed;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 18px;
  font-weight: bold;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid white;
  cursor: pointer;
}

/* Overlay for blur background */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
  display: none;
}

/* Avatar Popup */
.avatar-popup {
  position: fixed;
  top: 60px;
  right: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 15px;
  width: 200px;
  text-align: center;
  display: none;
  z-index: 101;
}

.popup-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.switch-btn {
  margin-top: 10px;
  background-color: #2f80ed;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.switch-btn:hover {
  background-color: #2466c0;
}

/* Tab Bar */
.tab-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #ccc;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
  z-index: 100;
}

.tab {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.tab.active {
  font-weight: bold;
  color: #2f80ed;
}

/* Main Area */
.mobile-main {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: calc(100vh - 120px);
}

/* Info Card */
.info-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-card h2 {
  margin-bottom: 10px;
}

/* Notice Board */
.notice-board {
  background: #fffbea;
  padding: 20px;
  border-left: 6px solid #f9c74f;
  border-radius: 10px;
}

.notice-board h2 {
  margin-bottom: 10px;
}

.notice-board ul {
  list-style: none;
}

.notice-board li {
  padding: 6px 0;
  font-size: 15px;
}

/* Today tab attendance summary */
.attendance-summary {
  background: white;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-size: 16px;
  text-align: center;
  margin-bottom: 20px;
}

/* Subjects rack */
.subjects-rack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.subject-btn {
  background-color: #2f80ed;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
  flex: 1 1 40%;
  max-width: 45%;
  box-shadow: 0 3px 6px rgba(47, 128, 237, 0.5);
  transition: background-color 0.2s ease;
}

.subject-btn:hover {
  background-color: #2466c0;
}

/* Subject Modal */
.subject-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 320px;
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%);
  z-index: 102;
  display: none;
  flex-direction: column;
  text-align: center;
}

.subject-modal.show {
  display: flex;
}

.subject-modal h3 {
  margin-bottom: 15px;
}

.subject-modal p {
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.4;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}

.close-btn:hover {
  color: #555;
}

/* Responsive */
@media (min-width: 600px) {
  .mobile-main {
    max-width: 500px;
    margin: auto;
  }
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #2f80ed;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  flex-direction: column;
}

.splash-logo {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
}

.splash-content p {
  font-size: 16px;
  opacity: 0.8;
}

/* Login Screen */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #2f80ed;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  flex-direction: column;
}

.login-box {
  background: white;
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  width: 90%;
  max-width: 320px;
  text-align: center;
}

.login-box h2 {
  margin-bottom: 20px;
  color: #2f80ed;
}

.login-box input {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.login-box button {
  width: 100%;
  background-color: #2f80ed;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  font-weight: bold;
}

.login-box button:hover {
  background-color: #2466c0;
}

.error-message {
  color: #ff4444;
  margin-top: 10px;
  font-size: 14px;
}

/* Subject Scores List */
.score-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  font-size: 16px;
}

.score-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
