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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.header {
    background: linear-gradient(45deg, #0066ff, #00ccff);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 800px;
    margin-bottom: 1rem;
    border-radius: 12px;
    color: white;
    cursor: pointer;
}

.header h1 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 600;
}

.container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#reader {
    width: 100%;
    aspect-ratio: 1.5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

#result {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 1rem;
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    word-break: break-word;
}

#result h3 {
    margin: 0;
    font-size: 1.2rem;
}

.button-group {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.button {
    background: linear-gradient(45deg, #0066ff, #00ccff);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.button:hover {
    background: linear-gradient(45deg, #0052cc, #0099cc);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.4rem;
    }

    .button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .toast {
        width: 90%;
        text-align: center;
    }
}
