
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-title i {
    color: #667eea;
    font-size: 1.8rem;
}

.header-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-warning {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.progress-container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.progress-bar.completed {
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.progress-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-bar.completed .progress-fill {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.progress-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.progress-text.completed {
    color: #fbbf24;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.completion-badge {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(251, 191, 36, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
    }
}

.stats-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin: 0 1rem 1rem;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.stat-card i {
    font-size: 1.5rem;
}

.text-blue { color: #3b82f6; }
.text-orange { color: #f59e0b; }
.text-green { color: #10b981; }

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

.category-stats h3 {
    margin-bottom: 1rem;
    color: #4a5568;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f1f5f9;
    border-radius: 6px;
}

.category-count {
    font-weight: 600;
    color: #64748b;
}

.card-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.question-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.question-card:hover {
    transform: translateY(-5px);
}

.card-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-number {
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.question-text {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #1a202c;
    margin-bottom: 1.5rem;
    text-align: center;
}

.question-options {
    margin: 1rem 0;
}

.option {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #e2e8f0;
}

.card-footer {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #667eea;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover:not(:disabled) {
    background: #5a67d8;
    transform: scale(1.1);
}

.swipe-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: #64748b;
    font-size: 0.75rem;
}

.swipe-indicator i {
    font-size: 1rem;
    color: #9ca3af;
}

.category-osobní { border-left: 4px solid #3b82f6; }
.category-osobní .category-badge { background: #dbeafe; color: #1e40af; }

.category-humor { border-left: 4px solid #f59e0b; }
.category-humor .category-badge { background: #fef3c7; color: #92400e; }

.category-programování { border-left: 4px solid #3b82f6; }
.category-programování .category-badge { background: #dbeafe; color: #1e40af; }

.category-databáze { border-left: 4px solid #10b981; }
.category-databáze .category-badge { background: #d1fae5; color: #065f46; }

.category-web { border-left: 4px solid #f59e0b; }
.category-web .category-badge { background: #fef3c7; color: #92400e; }

.category-síťování { border-left: 4px solid #8b5cf6; }
.category-síťování .category-badge { background: #ede9fe; color: #5b21b6; }

.category-bezpečnost { border-left: 4px solid #ef4444; }
.category-bezpečnost .category-badge { background: #fee2e2; color: #991b1b; }

.category-obecné { border-left: 4px solid #64748b; }
.category-obecné .category-badge { background: #f1f5f9; color: #334155; }

.category-vztahy { border-left: 4px solid #ec4899; }
.category-vztahy .category-badge { background: #fce7f3; color: #be185d; }

.category-filozofické { border-left: 4px solid #7c3aed; }
.category-filozofické .category-badge { background: #f3e8ff; color: #5b21b6; }

.category-zážitky { border-left: 4px solid #06b6d4; }
.category-zážitky .category-badge { background: #cffafe; color: #0e7490; }

.category-odvážné { border-left: 4px solid #dc2626; }
.category-odvážné .category-badge { background: #fecaca; color: #7f1d1d; }

.category-kreativní { border-left: 4px solid #059669; }
.category-kreativní .category-badge { background: #a7f3d0; color: #064e3b; }

.category-dilema { border-left: 4px solid #d97706; }
.category-dilema .category-badge { background: #fed7aa; color: #9a3412; }

.category-společenské { border-left: 4px solid #7c2d12; }
.category-společenské .category-badge { background: #fef3c7; color: #92400e; }

.category-budoucnost { border-left: 4px solid #8b890e; }
.category-budoucnost .category-badge { background: #fef3c7; color: #837005; }

.navigation-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    flex-wrap: wrap;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

.dot.viewed {
    background: #10b981;
}

.no-questions {
    text-align: center;
    color: white;
    padding: 2rem;
}

.no-questions i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.no-questions h2 {
    margin-bottom: 0.5rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    color: #1a202c;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: #f1f5f9;
}

.modal-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.custom-category-input {
    margin-top: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.file-import {
    padding: 1rem;
    text-align: center;
}

.card-slide-enter-active,
.card-slide-leave-active {
    transition: all 0.1s ease;
}

.card-slide-enter-from {
    opacity: 0;
    transform: translateX(20px);
}

.card-slide-leave-to {
    opacity: 0;
    transform: translateX(-20px);
}

.slide-down-enter-active,
.slide-down-leave-active {
    transition: all 0.3s ease;
}

.slide-down-enter-from,
.slide-down-leave-to {
    opacity: 0;
    transform: translateY(-20px);
}

.modal-enter-active,
.modal-leave-active {
    transition: all 0.3s ease;
}

.modal-enter-from,
.modal-leave-to {
    opacity: 0;
    transform: scale(0.9);
}

@media (max-width: 414px) {
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .header-controls {
        justify-content: center;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .question-card {
        min-height: 350px;
        margin: 0 0.5rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-footer {
        padding: 1rem;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .swipe-indicator span {
        display: none;
    }
}

@media (min-width: 415px) and (max-width: 1024px) {
    .header-content {
        padding: 0 1.5rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .app-title {
        font-size: 1.4rem;
    }
    
    .header-controls {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .question-card {
        max-width: 650px;
        min-height: 450px;
    }
    
    .question-text {
        font-size: 1.3rem;
        line-height: 1.5;
    }
    
    .card-content {
        padding: 2rem;
    }
    
    .card-footer {
        padding: 1.5rem;
    }
    
    .nav-btn {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .navigation-dots {
        padding: 1.5rem;
        gap: 0.75rem;
    }
    
    .dot {
        width: 14px;
        height: 14px;
    }
    
    .progress-container {
        padding: 1.5rem;
    }
    
    .progress-text {
        font-size: 1rem;
    }
    
    .modal {
        max-width: 600px;
        margin: 2rem;
    }
    
    .modal-form {
        padding: 2rem;
    }
    
    .form-group textarea {
        min-height: 120px;
        font-size: 1rem;
    }
}

@media (min-width: 1025px) {
    .question-card {
        max-width: 600px;
    }
    
    .card-container {
        padding: 2rem;
    }
    
    .header-content {
        padding: 0 2rem;
    }
}

@media (hover: none) {
    .question-card {
        user-select: none;
        -webkit-user-select: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .nav-btn:hover:not(:disabled) {
        transform: none;
    }
    
    .question-card:hover {
        transform: none;
    }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .question-card {
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .question-card {
        max-width: 700px;
        min-height: 400px;
    }
    
    .header {
        padding: 0.75rem 0;
    }
    
    .card-container {
        padding: 1rem;
    }
    
    .progress-container {
        padding: 1rem;
    }
}

@media (max-width: 767px) and (orientation: landscape) {
    .question-card {
        min-height: 300px;
    }
    
    .header {
        padding: 0.5rem 0;
    }
    
    .progress-container {
        padding: 0.5rem 1rem;
    }
}

@media (prefers-color-scheme: dark) {
    .stats-panel {
        background: rgba(31, 41, 55, 0.95);
        color: #f9fafb;
    }
    
    .stat-card {
        background: #374151;
        color: #f9fafb;
    }
    
    .category-stat {
        background: #374151;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
