:root {
    --primary: #00f2ff;
    --secondary: #0062ff;
    --bg: #080a0f;
    --glass: rgba(255, 255, 255, 0.05);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
    color: white;
    font-family: 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    padding: 20px;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    text-align: center;
    width: 100%;
    max-width: 500px;
}

h1 {
    margin: 0 0 30px;
    font-weight: 300;
    letter-spacing: 2px;
}

h1 span {
    color: var(--primary);
    font-weight: 800;
}

.custom-loader {
    display: inline-block;
    padding: 12px 24px;
    background: white;
    color: black;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.custom-loader:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,255,255,0.2);
}

.input-group {
    position: relative;
    margin: 30px 0;
}

input[type="text"] {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding: 10px 0;
    color: white;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

input[type="text"]:focus {
    border-bottom-color: var(--primary);
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-enc { background: linear-gradient(45deg, var(--secondary), var(--primary)); color: white; }
.btn-dec { background: white; color: black; }

button:not(:disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

#status {
    margin-top: 20px;
    font-size: 14px;
    color: rgba(255,255,255,0.4);
}

.canvas-wrapper {
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}

canvas {
    max-width: 100%;
    image-rendering: pixelated;
}


/* Прогресс-бар */
.progress-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 25px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    box-shadow: 0 0 15px var(--primary);
    transition: width 0.1s ease;
}

.progress-text {
    font-size: 10px;
    color: var(--primary);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Адаптив под мобилки */
@media (max-width: 600px) {
    .glass-card {
        padding: 20px;
        width: 90%;
    }
    h1 { font-size: 24px; }
    .actions { flex-direction: column; }
    input[type="text"] { font-size: 14px; }
}
