* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: white;
    overflow-x: hidden;
}

/* Page Management */
.page {
    display: none;
    min-height: 100vh;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.page.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
}

.page.slide-in-right {
    transform: translateX(0);
    opacity: 1;
}

/* Header */
.header {
    background-color: #e53e3e;
    color: white;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
}

.student-name {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
    margin-right: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-btn {
    background: none;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.profile-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.back-btn {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s;
    margin-right: 12px;
}

.back-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
}

/* Notices Container */
.notices-container {
    padding: 16px;
    padding-bottom: 80px;
    max-width: 100%;
}

.date-header {
    text-align: center;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    margin: 24px 0 16px 0;
    position: relative;
}

.date-header::before,
.date-header::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background-color: #ddd;
}

.date-header::before {
    left: 0;
}

.date-header::after {
    right: 0;
}

.notice-card {
    background: 666;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 0px 0px rgba(0,0,0,0);
    display: flex;
    gap: 12px;
}

.notice-icon {
    width: 40px;
    height: 40px;
    background-color: #4ade80;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notice-content {
    flex: 1;
}

.notice-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.notice-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Profile Container */
.profile-container {
    padding-bottom: 80px;
}

.profile-section {
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
    margin-bottom: 9px;
    background-color: #f5f5f5;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 16px;
    overflow: hidden;
    border: 4px solid #e5e5e5;
    cursor: pointer;
    transition: transform 0.2s;
}

.profile-photo:hover {
    transform: scale(1.05);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.profile-details {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.profile-label {
    font-size: 12px;
    color: #999;
}


.settings-section h3 {
    padding-left: 13px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.5px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-bottom: 90px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 9px 6px;
    background: 666;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.setting-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.setting-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.setting-icon.session {
    background-color: #4ade80;
}

.setting-icon.password {
    background-color: #374151;
}

.setting-icon.privacy {
    background-color: #fbbf24;
}

.setting-icon.logout {
    background-color: #4ade80;
}

.setting-item span {
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

/* Personal Info Container */
.personal-info-container {
    padding: 16px;
    padding-bottom: 80px;
}

.info-section {
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.profile-photo-small {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 3px solid #e5e5e5;
}

.profile-photo-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-grid {
    display: flex;
    flex-direction: column;
}

.info-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.info-row:last-child {
    border-bottom: none;
}

.label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    min-width: 120px;
    flex-shrink: 0;
}

.value {
    font-size: 14px;
    color: #666;
    flex: 1;
    word-break: break-word;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    padding: 8px 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    cursor: pointer;
    transition: color 0.2s;
    color: #666;
}

.nav-item.active {
    color: #e53e3e;
}

.nav-item:hover {
    color: #e53e3e;
}

.nav-item span {
    font-size: 10px;
    margin-top: 4px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 375px) {
    .student-name {
        font-size: 14px;
    }
    
    .profile-btn span {
        display: none;
    }
    
    .settings-grid {
        gap: 12px;
    }
    
    .setting-item {
        padding: 16px 12px;
    }
    
    .label {
        min-width: 100px;
        font-size: 13px;
    }
    
    .value {
        font-size: 13px;
    }
}

@media (min-width: 768px) {
    .notices-container,
    .profile-container,
    .personal-info-container {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .settings-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notice-card,
.setting-item,
.info-section {
    border: none;  /* removes any visible border */
    box-shadow: none
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .notice-card:hover,
    .setting-item:hover,
    .profile-photo:hover {
        transform: none;
    }
    
    .notice-card:active,
    .setting-item:active {
        transform: scale(0.98);
    }
    
    .profile-photo:active {
        transform: scale(0.95);
    }
}