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

body {
    font-family: 'Jura', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #ffffff;
    position: relative;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.logo-container {
    margin-bottom: 20px;
    text-align: center;
}

.logo-container a {
    display: inline-block;
    text-decoration: none;
}

.logo-container img {
    height: 40px;
    width: auto;
    max-width: 200px;
}

.container {
    background: #2a2a2a;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 10;
}

h1 {
    color: #ffffff;
    margin-bottom: 5px;
    text-align: center;
    font-size: 35px;
}

h2 {
    color: #ffffff;
    margin-bottom: 15px;
    text-align: center;
    font-size: 20px;
    font-weight: 200;
}

.how-it-works {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: left;
    padding: 0 10px;
}

.how-it-works strong {
    color: #ffffff;
}

.form-group {
    margin-bottom: 25px;
}

.file-group {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 25px;
}

.file-input-wrapper {
    flex: 1;
}

.pages-input-wrapper {
    flex: 0 0 120px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
}

input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s;
    color: #000000;
}

input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    color: #000000;
}

input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

@media (max-width: 600px) {
    .file-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pages-input-wrapper {
        flex: 1;
    }
}

.btn {
    font-family: 'Jura', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    width: 100%;
    padding: 15px;
    background: #7fbb21;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 19px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-icon {
    font-size: 18px;
    margin-right: 0px;
    transition: transform 0.3s ease;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.15) rotate(10deg);
    }
}

.btn:hover .btn-icon {
    animation: sparkle-fast 0.6s ease-in-out infinite;
}

@keyframes sparkle-fast {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(-10deg);
    }
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(127, 187, 33, 0.4);
    background: #8fcb31;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.spinner {
    border: 4px solid #333;
    border-top: 4px solid #80bb22;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.download-link {
    display: none;
    margin-top: 20px;
    text-align: center;
}

.download-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #7fbb21;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
}

.download-link a i {
    font-size: 16px;
}

.download-link a:hover {
    background: #8fcb31;
}

.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    text-align: center;
    color: #999;
    font-size: 12px;
}

.footer a {
    color: #80bb22;
    text-decoration: none;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.how-it-works ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.how-it-works ul li {
    margin-bottom: 0px;
}

.how-it-works ul li:last-child {
    margin-bottom: 0;
}

.how-it-works ul li:before {
    margin-right: 10px;
}