/* Container */
.ytgp-container {
    background: none;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Main Window */
.ytgp-window {
    width: 90vw;
    max-width: 900px;
    background: #FFFFFF;
    border-radius: 20px;
    margin: 0 auto;
}

/* Header */
.ytgp-header {
    background: #282828;
    color: #FFFFFF;
    padding: 15px;
    text-align: center;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.ytgp-header h2 {
    margin: 0;
    font-size: 24px;
    color: #FFFFFF;
}

.ytgp-traffic-lights {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.ytgp-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.red { background: #ff5f57; }
.yellow { background: #ffbc2f; }
.green { background: #28c941; }

/* Content */
.ytgp-content {
    padding: 20px;
    background: #FFFFFF;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.ytgp-input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #FFFFFF;
    color: #282828;
}

.ytgp-input:focus {
    border-color: #FF0000;
    outline: none;
}

.ytgp-button {
    width: 100%;
    padding: 12px 20px;
    background: #FF0000;
    color: #FFFFFF;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.ytgp-button:hover {
    background: #CC0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.ytgp-button i {
    margin-right: 8px;
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF0000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Area */
.ytgp-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.topic-wrapper {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 15px;
    /* Removed shadow */
}

.topic-list {
    padding: 10px;
    border-radius: 10px;
    background: #f9f9f9;
    animation: fadeIn 0.5s ease-in;
}

.topic-item {
    display: block;
    padding: 10px 15px;
    margin: 5px 0;
    background: #282828;
    color: #FFFFFF;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.topic-item.selected {
    border: 2px solid #FF0000;
}

.topic-item:hover {
    background: #333333;
}

.copy-button, .export-csv-button, .regenerate-button {
    display: block;
    width: 200px;
    margin: 20px auto 0;
    padding: 12px 24px;
    background: #FF0000;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.regenerate-button {
    background: #282828;
}

.copy-button:hover, .export-csv-button:hover {
    background: #CC0000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.regenerate-button:hover {
    background: #333333;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.copy-button i, .export-csv-button i, .regenerate-button i {
    margin-right: 8px;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 600px) {
    .ytgp-window {
        width: 100%;
        max-width: 100%;
    }
    .topic-wrapper {
        max-width: 100%;
    }
    .copy-button, .export-csv-button, .regenerate-button {
        width: 100%;
    }
}