* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(1px);
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.container {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 60px 50px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 450px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.25);
}

.logo {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.subtitle {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 50px;
    font-weight: 400;
    line-height: 1.5;
}

.connect-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 18px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.connect-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.connect-button:hover::before {
    left: 100%;
}

.connect-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.connect-button:active {
    transform: translateY(0);
}

.hubrise-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L2 7L12 12L22 7L12 2Z' stroke='currentColor' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M2 17L12 22L22 17' stroke='currentColor' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M2 12L12 17L22 12' stroke='currentColor' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    mask-size: contain;
    vertical-align: middle;
}

.footer-text {
    margin-top: 40px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

.footer-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-text a:hover {
    color: #764ba2;
}

.language-selector {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 20;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: space-between;
}

.language-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.language-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    display: inline-block;
}

.flag-de { background-image: url("https://cdn.onylab.com/image/flag/4x3/de.svg"); }
.flag-en { background-image: url("https://cdn.onylab.com/image/flag/4x3/gb.svg"); }
.flag-es { background-image: url("https://cdn.onylab.com/image/flag/4x3/es.svg"); }
.flag-fr { background-image: url("https://cdn.onylab.com/image/flag/4x3/fr.svg"); }
.flag-pt { background-image: url("https://cdn.onylab.com/image/flag/4x3/pt.svg"); }
.flag-ar { display: none; }

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 160px;
    overflow: hidden;
}

.language-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.language-option:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.language-option.active {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    font-weight: 600;
}

@media (max-width: 640px) {
    .login-card {
        padding: 40px 30px;
        margin: 20px;
        border-radius: 20px;
    }
    
    .logo {
        font-size: 28px;
    }
    
    .connect-button {
        padding: 16px 32px;
        font-size: 15px;
    }

    .language-selector {
        top: 20px;
        right: 20px;
    }

    .language-button {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 100px;
    }

    .language-menu {
        min-width: 140px;
    }

    .language-option {
        padding: 10px 12px;
        font-size: 13px;
    }
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

/* APPS */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.app-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.app-card:hover::before {
    left: 100%;
}

.app-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.app-card:active {
    transform: translateY(-2px) scale(1.02);
}

.app-card.app {
    background: linear-gradient(135deg, #2e2e2e 0%, #3c3c3c 100%);
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(10px);
}

.app-icon img {
    width: 100%;
}

.app-name {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
}

@media (max-width: 640px) {
    .apps-grid {
        gap: 16px;
    }

    .app-card {
        padding: 20px;
    }

    .app-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        border-radius: 12px;
    }

    .app-name {
        font-size: 12px;
    }
}