* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Экран загрузки */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

.loader-text {
    font-size: 56px;
    font-weight: 300;
    letter-spacing: 12px;
    color: #000000;
    margin-bottom: 40px;
    display: inline-block;
}

.loader-text .letter {
    display: inline-block;
    opacity: 0;
    animation: letterFadeIn 0.5s ease forwards;
}

.loader-text .letter:nth-child(1) { animation-delay: 0.1s; }
.loader-text .letter:nth-child(2) { animation-delay: 0.15s; }
.loader-text .letter:nth-child(3) { animation-delay: 0.2s; }
.loader-text .letter:nth-child(4) { animation-delay: 0.25s; }
.loader-text .letter:nth-child(5) { animation-delay: 0.3s; }
.loader-text .letter:nth-child(6) { animation-delay: 0.35s; }
.loader-text .letter:nth-child(7) { animation-delay: 0.4s; }
.loader-text .letter:nth-child(8) { animation-delay: 0.45s; }
.loader-text .letter:nth-child(9) { animation-delay: 0.5s; }
.loader-text .letter:nth-child(10) { animation-delay: 0.55s; }
.loader-text .letter:nth-child(11) { animation-delay: 0.6s; }

.loader-text .letter.space {
    width: 12px;
}

@keyframes letterFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.loader-bar {
    width: 300px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: #000000;
    animation: progressLoad 2.5s ease forwards;
}

@keyframes progressLoad {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

.container {
    width: 100%;
    height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card-grid {
    display: grid;
    grid-template-columns: 50% 50%;
    grid-template-rows: 50% 50%;
    width: 100%;
    height: 100vh;
}

.card {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: opacity 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: none;
    outline: none;
}

.card-content {
    text-align: center;
}

.card-logo {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
    display: block;
}

.logo-white {
    filter: brightness(0) invert(1);
}

/* Цвета карточек */
.card-red {
    background: #e74c3c;
}

.card-green {
    background: #27ae60;
}

.card-yellow {
    background: #f1c40f;
}

.card-blue {
    background: #3498db;
}

/* Адаптивность */
@media (max-width: 768px) {
    .card-logo {
        max-width: 200px;
        max-height: 200px;
    }

    .loader-text {
        font-size: 36px;
        letter-spacing: 6px;
    }

    .loader-bar {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .card-logo {
        max-width: 150px;
        max-height: 150px;
    }

    .loader-text {
        font-size: 28px;
        letter-spacing: 4px;
    }

    .loader-bar {
        width: 200px;
    }
}
