.leitner-interface {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.leitner-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Leitner top header section */
.leitner-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.leitner-header {
    flex: 1;
}

.leitner-header h2 {
    white-space: nowrap;
    margin: 0;
}

.leitner-title {
    font-size: 40px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.leitner-subtitle {
    font-size: 17px;
    font-weight: 500;
    color: #86868b;
    letter-spacing: -0.01em;
}

.leitner-boxes-grid {
    display: grid;
    margin-top: 10%;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.leitner-box-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.leitner-box-card:hover {
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}
  
  .leitner-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px;
  }
  
  .leitner-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
  }

  .leitner-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1d1d1f;
  }
  
  .leitner-action-btn:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
  }
  
  .leitner-action-btn:active {
    transform: scale(0.95);
  }
  
  .leitner-action-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
  }

.leitner-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.leitner-box-title {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.02em;
    margin: 0;
}

.leitner-box-count {
    background: #f5f5f7;
    color: #1d1d1f;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
}

.leitner-box-schedule {
    font-size: 15px;
    color: #86868b;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.leitner-study-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.leitner-study-btn.active {
    background: #0071e3;
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 113, 227, 0.3);
}

.leitner-study-btn.active:hover {
    background: #0077ed;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.4);
    transform: translateY(-2px);
}

.leitner-study-btn.inactive {
    background: #f5f5f7;
    color: #86868b;
    cursor: not-allowed;
}

.leitner-study-view {
    display: none;
}

.leitner-study-view.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.leitner-study-container {
    width: 100%;
    max-width: 480px;
    padding: 0;
    margin: 0;
}

.leitner-study-progress {
    text-align: center;
    margin-bottom: 24px;
    margin-top: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    color: #86868b;
    letter-spacing: -0.01em;
}

.leitner-card-container {
    perspective: 1500px;
    margin-bottom: 32px;
}

.leitner-card {
    width: 100%;
    max-width: 480px;
    height: 520px;
    margin: 0 auto;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

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

.leitner-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.leitner-card:hover .leitner-card-face {
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.12);
}

.leitner-card-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 24px;
    color: #0071e3;
}

.leitner-card-content {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #1d1d1f;
}

.leitner-card-back {
    transform: rotateY(180deg);
}

.leitner-card-back .leitner-card-content {
    font-size: 24px;
    font-weight: 500;
}

.leitner-card-back .leitner-card-label {
    color: #06c;
}

.leitner-action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.leitner-card-action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.leitner-btn {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.leitner-btn-wrong {
    background: #ff3b30;
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(255, 59, 48, 0.3);
}

.leitner-btn-wrong:hover {
    background: #ff4d42;
    box-shadow: 0 4px 16px rgba(255, 59, 48, 0.4);
    transform: translateY(-1px);
}

.leitner-btn-correct {
    background: #34c759;
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(52, 199, 89, 0.3);
}

.leitner-btn-correct:hover {
    background: #3dd662;
    box-shadow: 0 4px 16px rgba(52, 199, 89, 0.4);
    transform: translateY(-1px);
}

.leitner-btn:active {
    transform: scale(0.98);
}

.leitner-hint {
    text-align: center;
    color: #86868b;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.leitner-complete-message {
    background: #ffffff;
    border-radius: 24px;
    padding: 60px 40px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.leitner-complete-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.leitner-complete-title {
    font-size: 32px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.leitner-complete-text {
    font-size: 17px;
    font-weight: 500;
    color: #86868b;
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

@media (max-width: 600px) {
    .leitner-title {
        font-size: 32px;
    }

    .leitner-boxes-grid {
        grid-template-columns: 1fr;
    }

    .leitner-card {
        height: 460px;
    }

    .leitner-card-content {
        font-size: 28px;
    }

    .leitner-card-back .leitner-card-content {
        font-size: 20px;
    }
}
