* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    display: flex;
    flex-direction: column;
    background-attachment: fixed;
}

.container {
    max-width: 100%;
    padding: 16px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 100px;
}

.header {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px 0;
}

.university-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 3rem;
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.header h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-top: 8px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.user-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar .avatar-placeholder {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.user-status {
    color: #666;
    font-size: 0.9rem;
}

.user-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4757;
}

.user-badge.connected {
    background: #2ed573;
}

.section-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.action-card:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.action-text {
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.notification-content {
    flex: 1;
}

.notification-text {
    font-weight: 500;
    margin-bottom: 4px;
}

.notification-time {
    color: #666;
    font-size: 0.8rem;
}

.news-carousel {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-item {
    padding: 20px;
    display: none;
}

.news-item.active {
    display: block;
}

.news-item h3 {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2f3542;
}

.news-item p {
    color: #666;
    font-size: 0.9rem;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px 20px 0 0;
    padding: 12px;
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    z-index: 1000;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.nav-item {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #666;
    text-decoration: none;
}

.nav-item:active {
    background-color: rgba(102, 126, 234, 0.1);
}

.nav-item.active {
    color: #667eea;
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-text {
    font-size: 0.7rem;
    font-weight: 500;
}

@media (max-width: 360px) {
    .container {
        padding: 12px;
        padding-bottom: 90px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .action-card {
        padding: 16px 12px;
    }
    
    .bottom-nav {
        padding: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
}

@media (min-height: 800px) {
    .container {
        padding-bottom: 110px;
    }
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.success {
    border-left: 4px solid #2ed573;
}

.main-content {
    scroll-behavior: smooth;
}

.main-content::-webkit-scrollbar {
    display: none;
}

.main-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.link-reset {
    all: unset;
    cursor: pointer;
}