* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23667eea' stroke='%23ffffff' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='2' fill='%23ffffff'/%3E%3C/svg%3E") 12 12, auto !important;
}

button, a, .clickable, .app-box, .dock-item, .scroll-arrow, .logo {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23ff6b6b' stroke='%23ffffff' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='2' fill='%23ffffff'/%3E%3C/svg%3E") 12 12, pointer !important;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    position: relative;
}

.welcome-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    flex-direction: column;
}

.welcome-video-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.welcome-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-text {
    display: none;
}

.skip-intro {
    display: none;
}

.app-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 1);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    margin: 0;
    padding: 0;
}

.app-video-container {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

.app-video-container video {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    margin: 0;
    padding: 0;
}

.loading-text {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 107, 107, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 195, 113, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 60% 80%, rgba(199, 125, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 90% 60%, rgba(255, 107, 129, 0.4) 0%, transparent 50%);
    animation: colorfulBubbles 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes colorfulBubbles {
    0%, 100% {
        transform: translate(0px, 0px) scale(1) rotate(0deg);
        opacity: 0.6;
    }
    25% {
        transform: translate(30px, -30px) scale(1.2) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translate(-20px, 20px) scale(0.8) rotate(180deg);
        opacity: 0.7;
    }
    75% {
        transform: translate(40px, 10px) scale(1.1) rotate(270deg);
        opacity: 0.9;
    }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(120, 119, 198, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(255, 255, 255, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 70% 10%, rgba(255, 204, 112, 0.3) 0%, transparent 35%);
    animation: floatingParticles 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatingParticles {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.4;
    }
}

.main-content {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.main-content.visible {
    display: flex;
}

.main-content.fade-in {
    opacity: 1;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.school-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.logo {
    width: 60px;
    height: 60px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 5px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.date-time {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    border-radius: 15px;
    color: white;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.app-scroll-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0 40px;
    z-index: 10;
}

.app-panel {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    width: 100%;
    padding: 20px 0;
}

.app-panel::-webkit-scrollbar {
    display: none;
}

.app-panel {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: white;
    font-size: 1.2rem;
    user-select: none;
}

.scroll-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.scroll-arrow.left {
    left: 10px;
}

.scroll-arrow.right {
    right: 10px;
}

.scroll-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.app-box {
    flex: 0 0 320px;
    height: 360px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    gap: 15px;
}

.app-box .app-icon {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-box .app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.app-box .app-icon::before {
    content: 'CLICK TO OPEN';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.8);
    padding: 6px 12px;
    border-radius: 6px;
    z-index: 2;
    pointer-events: none;
}

.app-box .app-icon:hover::before {
    opacity: 1;
}

.app-box .app-icon:hover img {
    transform: scale(1.1);
}

.app-box .app-name {
    display: none;
}

.app-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.app-box:hover::before {
    transform: translateX(100%);
}

.app-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.25);
}

.dock {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    margin: 20px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.dock-item {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dock-item:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.streak {
    font-weight: 600;
    font-size: 0.9rem;
    width: auto;
    padding: 0 15px;
    cursor: default;
}

.streak:hover {
    transform: none;
}

@media (max-width: 1024px) {
    .top-bar, .dock {
        margin: 15px;
        padding: 15px 25px;
    }

    .app-scroll-wrapper {
        padding: 0 25px;
    }

    .app-panel {
        gap: 25px;
    }

    .app-box {
        flex: 0 0 300px;
        height: 340px;
    }

    .app-box .app-icon {
        width: 280px;
        height: 280px;
    }

    .scroll-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .top-bar, .dock {
        margin: 10px;
        padding: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .school-info {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .school-info span {
        font-size: 0.9rem;
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .date-time {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .app-scroll-wrapper {
        padding: 0 15px;
    }

    .app-panel {
        gap: 20px;
        padding: 15px 0;
    }

    .app-box {
        flex: 0 0 260px;
        height: 300px;
        border-radius: 20px;
        gap: 10px;
    }

    .app-box .app-icon {
        width: 240px;
        height: 240px;
        border-radius: 20px;
        padding: 15px;
    }

    .app-box .app-icon::before {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .scroll-arrow {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        left: 5px;
        right: 5px;
    }

    .dock-item {
        width: 45px;
        height: 45px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .streak {
        font-size: 0.8rem;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .top-bar, .dock {
        margin: 8px;
        padding: 10px;
    }

    .school-info {
        font-size: 0.8rem;
    }

    .logo {
        width: 40px;
        height: 40px;
    }

    .date-time {
        font-size: 0.8rem;
    }

    .app-scroll-wrapper {
        padding: 0 10px;
    }

    .app-panel {
        gap: 15px;
        padding: 10px 0;
    }

    .app-box {
        flex: 0 0 220px;
        height: 260px;
        border-radius: 15px;
    }

    .app-box .app-icon {
        width: 200px;
        height: 200px;
        border-radius: 15px;
        padding: 10px;
    }

    .scroll-arrow {
        display: none;
    }

    .dock-item {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .streak {
        font-size: 0.7rem;
    }
}

@media (orientation: landscape) and (max-height: 480px) {
    .top-bar {
        padding: 10px 20px;
        margin: 10px;
    }

    .school-info {
        flex-direction: row;
        font-size: 0.9rem;
    }

    .logo {
        width: 40px;
        height: 40px;
    }

    .date-time {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .app-scroll-wrapper {
        padding: 0 20px;
    }

    .app-panel {
        gap: 20px;
        padding: 10px 0;
    }

    .app-box {
        flex: 0 0 200px;
        height: 240px;
    }

    .app-box .app-icon {
        width: 180px;
        height: 180px;
    }

    .dock {
        padding: 10px;
        margin: 10px 20px;
        gap: 10px;
    }

    .dock-item {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}
