#caption-box {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#caption-box h2 {
    text-align: center;
    color: #262626;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

#caption-topic {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#caption-topic:focus {
    border-color: #a8a8a8;
    outline: none;
}

#caption-button, #more-captions-button {
    width: 100%;
    padding: 12px;
    background-color: #0095f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.2s;
}

#caption-button:hover, #more-captions-button:hover {
    background-color: #0077cc;
}

#caption-list {
    display: none;
    margin-bottom: 20px;
}

.caption-item {
    background: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
    padding-right: 80px;
}

.caption-item p {
    margin: 0;
    color: #262626;
    font-size: 15px;
    line-height: 1.5;
}

.copy-button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-button:hover {
    background: #0077cc;
}

/* Loading state */
.loading #caption-button {
    position: relative;
    pointer-events: none;
}

.loading #caption-button:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 640px) {
    #caption-box {
        padding: 15px;
        border-radius: 0;
    }
    
    .caption-item {
        padding-right: 70px;
    }
    
    .copy-button {
        padding: 4px 8px;
        font-size: 12px;
    }
}