* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(45deg, #004e72 0%, #00aeff 50%, #00ffd5 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.container {
    max-width: 1200px;
    width: 100%;
    padding-bottom: 90px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 15px;
    font-size: 3.5em;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 50px;
    font-size: 1.4em;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.8s ease-out 0.2s both;
}

h3 {
    color: white;
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    animation: fadeIn 1s ease-out 0.4s both;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 45px 35px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: white;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.card:active {
    transform: translateY(-12px) scale(1.01);
}

.icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 15px;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card:hover .icon {
    transform: scale(1.2) rotate(360deg);
    background: rgba(255, 255, 255, 0.25);
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.matrix {
    background: linear-gradient(135deg, rgba(13, 189, 139, 0.4) 0%, rgba(7, 140, 97, 0.4) 100%);
}

.matrix:hover {
    background: linear-gradient(135deg, rgba(13, 189, 139, 0.5) 0%, rgba(7, 140, 97, 0.5) 100%);
}

.matrix .icon img {
    filter: drop-shadow(0 4px 10px rgba(13, 189, 139, 0.3));
}

.nextcloud {
    background: linear-gradient(135deg, rgba(0, 130, 201, 0.4) 0%, rgba(0, 90, 143, 0.4) 100%);
}

.nextcloud:hover {
    background: linear-gradient(135deg, rgba(0, 130, 201, 0.5) 0%, rgba(0, 90, 143, 0.5) 100%);
}

.nextcloud .icon img {
    filter: brightness(0) invert(1) drop-shadow(0 4px 10px rgba(0, 130, 201, 0.3));
}

.webmail {
    background: linear-gradient(135deg, rgba(181, 135, 101, 0.4) 0%, rgba(143, 103, 79, 0.4) 100%);
}

.webmail:hover {
    background: linear-gradient(135deg, rgba(181, 135, 101, 0.5) 0%, rgba(143, 103, 79, 0.5) 100%);
}

.webmail .icon img {
    filter: drop-shadow(0 4px 10px rgba(181, 135, 101, 0.3));
}

.card p {
    font-size: 1.1em;
    opacity: 0.95;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    color: white;
    padding: 18px 20px;
    font-size: 0.95em;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.login-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.logout {
    background: rgba(255, 70, 70, 0.3);
    border-color: rgba(255,70,70,0.5);
}

#login-area {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 500;
}

.user-info span {
    font-size: 1em;
}

@media (max-width: 768px) {
    h1 { font-size: 2.5em; }
    h2 { font-size: 1.1em; }
    .dashboard { gap: 25px; }
    .card { padding: 35px 25px; }
}