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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.header-btn {
    background: #333;
    border: none;
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 14px;
}

.header-btn:hover {
    background: #444;
    transform: translateY(-1px);
}

.progress {
    font-size: 16px;
    color: #666;
}

/* Views */
.view {
    display: none;
    flex: 1;
}

.view.active {
    display: flex;
    flex-direction: column;
}

/* Flashcard View */
#flashcardView {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.card-wrapper {
    perspective: 1000px;
    height: 500px;
    margin-bottom: 40px;
    touch-action: pan-y;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card.swiping {
    transition: transform 0.1s;
}

.card-face {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    background: #2a2a2a;
    border-radius: 20px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-back {
    transform: rotateY(180deg);
    background: #3a3a3a;
}

.verb {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 48px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 20px;
}

.definition {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.5;
}

.examples {
    font-size: 18px;
    color: #ffffff;
    line-height: 1.8;
    font-style: italic;
}

.example {
    margin-bottom: 15px;
}

.translation {
    font-size: 36px;
    font-weight: bold;
    color: #2196F3;
}

.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.nav-button {
    background: #333;
    border: none;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-button:hover:not(:disabled) {
    background: #444;
    transform: scale(1.1);
}

.nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.counter {
    font-size: 18px;
    color: #666;
    min-width: 80px;
    text-align: center;
}

.swipe-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #666;
    opacity: 0.7;
}

/* Catalog View */
.catalog-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #333;
}

.back-btn {
    background: #333;
    border: none;
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: #444;
}

.catalog-header h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.search-container {
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    background: #333;
    border: 1px solid #444;
    border-radius: 25px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.search-container input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.search-container input::placeholder {
    color: #666;
}

.catalog-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.catalog-item {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.catalog-item:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border-color: #444;
}

.catalog-verb {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 10px;
}

.catalog-definition {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 8px;
    line-height: 1.4;
}

.catalog-translation {
    font-size: 14px;
    color: #2196F3;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 480px) {
    .header {
        padding: 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .card-wrapper {
        height: 450px;
    }
    
    .verb {
        font-size: 40px;
    }
    
    .definition {
        font-size: 18px;
    }
    
    .examples {
        font-size: 16px;
    }
    
    .translation {
        font-size: 30px;
    }

    .catalog-header {
        padding: 15px;
    }

    .catalog-list {
        padding: 15px;
    }

    .catalog-item {
        padding: 15px;
    }

    .catalog-verb {
        font-size: 20px;
    }

    .swipe-hint {
        display: block;
    }
}

@media (min-width: 481px) {
    .swipe-hint {
        display: none;
    }
}
