

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

footer {
    text-align: center;
    margin-top: auto; /* Tlačí patičku na spodek stránky, pokud je málo obsahu */
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.footer-links a:hover {
    color: #ffb347; /* Světlejší oranžová pro lepší viditelnost */
    text-decoration: underline;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.coffee-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #ff9500 0%, #ffb347 50%, #d2691e 100%);
    border: 2px solid #ff8c00;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.coffee-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.coffee-link:hover::before {
    left: 100%;
}

.coffee-link:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ffa500 50%, #cd853f 100%);
    border-color: #ff7f00;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.6);
}

.coffee-icon {
    font-size: 1.3rem;
    animation: coffeeFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.coffee-text {
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes coffeeFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(1deg);
    }
    75% {
        transform: translateY(-1px) rotate(-1deg);
    }
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main content */
main {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    flex: 1;
}

/* File section */
.file-section {
    margin-bottom: 30px;
}

.file-label {
    display: block;
    cursor: pointer;
}

.file-input-wrapper {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.file-input-wrapper:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 2rem;
}

.file-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #667eea;
}

.drag-hint {
    display: block;
    font-size: 0.8em;
    color: #999;
    margin-top: 4px;
    font-weight: 400;
}

/* Drag and Drop Styles */
.drop-zone {
    position: relative;
    transition: all 0.3s ease;
}

.drop-zone.drag-over {
    transform: scale(1.02);
}

.drop-zone.drag-over .file-input-wrapper {
    border-color: #667eea;
    background: #f0f2ff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.drop-zone.drag-active .file-input-wrapper {
    border-color: #28a745;
    background: #f8fff8;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.drop-zone.drag-active .file-text {
    color: #28a745;
}

.drop-zone.drag-active .file-icon {
    animation: bounce 0.6s ease-in-out infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-5px);
    }
}

.file-info {
    margin-top: 15px;
    padding: 10px;
    background: #e8f4fd;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #0066cc;
    display: none;
}

.file-info.show {
    display: block;
}

.file-info.success {
    background: #e8f5e8;
    color: #2d5a2d;
    border-left: 4px solid #28a745;
}

.file-info.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Options section */
.options-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.options-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.option-group {
    margin-bottom: 20px;
}

.option-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Checkbox styles */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.checkbox-wrapper:hover {
    background: rgba(102, 126, 234, 0.05);
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Radio button styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.radio-wrapper:hover {
    background: rgba(102, 126, 234, 0.05);
}

.radio-wrapper input[type="radio"] {
    display: none;
}

.radio-mark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.radio-wrapper input[type="radio"]:checked + .radio-mark {
    border-color: #667eea;
}

.radio-wrapper input[type="radio"]:checked + .radio-mark::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #667eea;
    border-radius: 50%;
}

.option-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.option-text strong {
    font-weight: 600;
    color: #333;
}

.option-text small {
    color: #666;
    font-size: 0.85rem;
}

/* Disabled option group styles */
.option-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.option-group.disabled .option-label {
    color: #999;
}

.option-group.disabled .radio-wrapper {
    cursor: not-allowed;
}

.option-group.disabled .radio-wrapper:hover {
    background: transparent;
}

.option-group.disabled .radio-mark {
    background-color: #f5f5f5;
    border-color: #ddd;
}

.option-group.disabled .option-text strong {
    color: #999;
}

.option-group.disabled .option-text small {
    color: #bbb;
}

/* Action section */
.action-section {
    text-align: center;
    margin-bottom: 30px;
}

.patch-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.patch-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.patch-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.button-icon {
    font-size: 1.2rem;
}

/* Progress section */
.progress-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.progress-section.hidden {
    display: none;
}

.progress-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.progress-step.completed {
    background: #e8f5e8;
    color: #2d5a2d;
}

.progress-step.active {
    background: #fff3cd;
    color: #856404;
}

.progress-step.pending {
    background: #f8f9fa;
    color: #6c757d;
}

.step-icon {
    font-size: 1rem;
}

/* Output section */
.output-section {
    margin-bottom: 20px;
}

.status-messages {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    display: none;
}

.status-messages.show {
    display: block;
}

.download-section {
    text-align: center;
    padding: 20px;
    background: #e8f5e8;
    border-radius: 8px;
    margin-top: 20px;
}

.download-section.hidden {
    display: none;
}

.download-section h3 {
    margin-bottom: 20px;
    color: #2d5a2d;
}

/* Support Prompt Styles */
.support-prompt {
    margin-bottom: 20px;
}

.support-message {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.support-message h4 {
    margin-bottom: 8px;
    color: #2d5a2d;
    font-size: 1.1rem;
}

.support-message p {
    margin: 0;
    color: #4a5d4a;
    font-size: 0.95rem;
}

.support-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.support-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    justify-content: center;
}

.yes-button {
    background: linear-gradient(135deg, #ff9500 0%, #ffb347 50%, #d2691e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.yes-button:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ffa500 50%, #cd853f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5);
}

.no-button {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.no-button:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.5);
}

.button-icon {
    font-size: 1.1rem;
}

/* Final Download Styles */
.final-download {
    animation: slideDown 0.4s ease-out;
}

.final-download.hidden {
    display: none;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.download-link:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.download-icon {
    font-size: 1.2rem;
}

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

/* Footer */
footer {
    margin-top: 30px;
    color: white;
}

.info-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.info-section h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.info-section ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 8px;
}

.warning-box {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.5);
    padding: 15px;
    border-radius: 6px;
    color: #856404;
    background-color: rgba(255, 255, 255, 0.9);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header-content {
        gap: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    .coffee-link {
        padding: 12px 18px;
        font-size: 0.9rem;
        gap: 8px;
    }

    main {
        padding: 20px;
    }

    .file-input-wrapper {
        padding: 20px;
    }

    .radio-group {
        gap: 5px;
    }

    .progress-steps {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .coffee-link {
        padding: 10px 16px;
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .coffee-icon {
        font-size: 1.1rem;
    }

    .patch-button {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .file-input-wrapper {
        padding: 15px;
    }

    .options-section {
        padding: 15px;
    }

    .support-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .support-button {
        min-width: auto;
        width: 100%;
        font-size: 0.9rem;
        padding: 10px 16px;
    }

    .support-message {
        padding: 12px;
    }

    .support-message h4 {
        font-size: 1rem;
    }

    .support-message p {
        font-size: 0.9rem;
    }
}

/* Animation for smooth transitions */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Loading state */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}