/* Stroke Animator Styles */
.stroke-animator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.stroke-animator svg {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    width: 300px;
    height: 300px;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
}

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

.stroke-controls button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #007bff;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
}

.stroke-controls button:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
}

.stroke-controls button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.stroke-controls button:active:not(:disabled) {
    transform: translateY(0);
}

.stroke-counter {
    font-weight: 600;
    color: #495057;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    min-width: 60px;
    text-align: center;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    background: white;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.error-message p {
    margin: 8px 0;
}

.error-message p:first-child {
    font-weight: 600;
    color: #dc3545;
}

/* Stroke animation styles */
.kanji-stroke {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kanji-stroke.visible {
    opacity: 1;
}

.kanji-stroke.current {
    stroke: #ff4444 !important;
    animation: strokeDraw 1s ease-in-out;
}

.kanji-stroke.completed {
    stroke: #333 !important;
}

@keyframes strokeDraw {
    from {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dasharray: 1000;
        stroke-dashoffset: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .stroke-animator {
        padding: 15px;
        margin: 15px 0;
    }
    
    .stroke-animator svg {
        width: 250px !important;
        height: 250px !important;
    }
    
    .stroke-controls {
        gap: 10px;
    }
    
    .stroke-controls button {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .stroke-animator svg {
        width: 200px !important;
        height: 200px !important;
    }
    
    .stroke-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .stroke-controls > div {
        display: flex;
        gap: 8px;
        align-items: center;
    }
}
