@font-face {
  font-family: 'KZ Samsung Sharp Sans';
  src: url('KZ_SamsungSharpSans.ttf') format('truetype');
  font-weight: normal;
  font-display: swap;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: 'KZ Samsung Sharp Sans', system-ui, -apple-system, sans-serif;
  background: #000;
}

        video {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            object-fit: cover;
            z-index: 0;
            transform: scaleX(-1);
        }

        canvas {
            position: absolute;
            top: 0; left: 0;
            z-index: 1;
        }

        #filePanel{
    position:absolute;
    top:20px;
    right:20px;
    z-index:9999;
}

#filePanel div a {
    display: inline-flex;
    align-items: center; /* Вертикаль тегістеу */
    gap: 8px;
    text-decoration: none;
    color: black;
    font-size: 15px;
    white-space: nowrap;
}

/* Мәтінді жоғары көтеру */
#filePanel div a span {
    transform: translateY(-1px); /* Төрірек көтеру үшін -3px немесе -4px жасауға болады */
    display: inline-block;
}

#filePanel div a img {
    width: 28px;  /* Сурет өлшемін де сәл ықшамдасауға болады */
    height: 32px;
    display: block;
}

#wordFile{
    background:#fff;
    padding:10px;
    border-radius:10px;
}

        #ui-overlay {
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
            text-align: center;
            width: 90%;
            max-width: 500px;
        }

        #question {
            background: rgba(255, 255, 255, 0.95);
            padding: 20px;
            border-radius: 20px;
            font-size: 32px;
            font-weight: 900;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            margin-bottom: 10px;
            color: #2c3e50;
            border: 3px solid #4CAF50;
        }

        #status {
            color: white;
            text-shadow: 0 2px 10px rgba(0,0,0,1);
            font-size: 18px;
            font-weight: 500;
            background: rgba(0,0,0,0.4);
            padding: 5px 15px;
            border-radius: 20px;
            display: inline-block;
        }

        #controls {
            position: absolute;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
            display: flex;
            gap: 20px;
        }
        a {
            text-decoration: none;
            color: black;
        }

        button {
            padding: 18px 35px;
            border: none;
            border-radius: 50px;
            font-size: 20px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 10px 20px rgba(0,0,0,0.3);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .btn-submit { background: #4CAF50; color: white; }
        .btn-clear { background: #f44336; color: white; }
        button:hover { transform: translateY(-5px); box-shadow: 0 15px 25px rgba(0,0,0,0.4); }
        button:active { transform: scale(0.9); }

        #loading-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.85);
            z-index: 100;
            color: white;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            font-size: 24px;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid #f3f3f3;
            border-top: 5px solid #4CAF50;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }

        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        /* Қате/Дұрыс хабарламасы */
#feedback {
    position: fixed;
    top: 170px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    background: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9999;
    display: none;
    text-align: center;
    min-width: 220px;
        }
        @keyframes pop { 0% { scale: 0.5; opacity: 0; } 100% { scale: 1; opacity: 1; } }

        /* ===========================
   Телефонға бейімдеу
=========================== */
@media (max-width: 768px) {

    #filePanel{
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        z-index: 9999;
    }

    #wordFile{
        width: 100%;
        box-sizing: border-box;
    }

    #ui-overlay{
        top: 120px;   /* файл панелінен кейін орналасады */
        width: 95%;
    }

    #question{
        font-size: 22px;
        padding: 15px;
    }

    #status{
        font-size: 15px;
    }
}