/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700&display=swap');

#ytcg-wrapper {
    max-width: 800px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    padding: 40px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

#ytcg-wrapper * {
    box-sizing: border-box;
}

/* Typography */
.ytcg-header h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 42px; /* Adjusted for web scaling, 55px can be huge on mobile */
    line-height: 1.2;
    color: #0F1729;
    margin-bottom: 10px;
    text-align: center;
}

.ytcg-header p {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #6B7280;
    text-align: center;
    margin-bottom: 30px;
}

/* Form Elements */
.ytcg-input-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

#ytcg-transcript {
    width: 100%;
    padding: 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #1F2937;
    background: #F9FAFB;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 200px;
}

#ytcg-transcript:focus {
    outline: none;
    border-color: #E88B5D; /* Matching reference button color approx */
    background: #fff;
    box-shadow: 0 0 0 4px rgba(232, 139, 93, 0.1);
}

.ytcg-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    font-size: 14px;
    color: #9CA3AF;
}

/* Button */
#ytcg-submit-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px 24px;
    background-color: #E88B5D; /* Reference Orange */
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
}

#ytcg-submit-btn:hover {
    background-color: #D67A4C;
}

#ytcg-submit-btn:disabled {
    background-color: #9CA3AF;
    cursor: not-allowed;
}

/* Results */
#ytcg-results-area {
    margin-top: 40px;
    border-top: 1px solid #E5E7EB;
    padding-top: 30px;
}

.ytcg-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ytcg-results-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    color: #0F1729;
    margin: 0;
}

.ytcg-chapter-item {
    display: flex;
    gap: 15px;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
}

.ytcg-timestamp {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #E88B5D;
    min-width: 60px;
}

.ytcg-chapter-content h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #111827;
}

.ytcg-chapter-content p {
    margin: 0;
    font-size: 14px;
    color: #6B7280;
}

/* Utilities */
.ytcg-action-btn {
    padding: 8px 16px;
    background: #F3F4F6;
    border: none;
    border-radius: 6px;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
}

.ytcg-action-btn:hover {
    background: #E5E7EB;
}

/* Loader */
.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}