/* Layout */
.yt-tool-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    background: #f9fafb;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

/* Sidebar */
.yt-tool-sidebar {
    flex: 1;
    min-width: 300px;
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    height: fit-content;
}

.yt-header h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 1.35rem;
}

.yt-form-group { margin-bottom: 20px; }
.yt-form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #374151; }
.yt-form-group textarea, .yt-form-group select {
    width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 1rem;
    box-sizing: border-box; background: #fff;
}
.yt-form-group textarea:focus, .yt-form-group select:focus {
    border-color: #ef4444; outline: none; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.yt-form-group textarea { min-height: 100px; resize: vertical; }

/* Button */
.yt-btn-primary {
    width: 100%; padding: 14px; background-color: #ef4444; color: white; border: none;
    border-radius: 8px; font-weight: 700; font-size: 1.05rem; cursor: pointer;
    transition: background 0.3s;
}
.yt-btn-primary:hover { background-color: #dc2626; }
.yt-btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

/* Results Area */
.yt-tool-results { flex: 1.5; min-width: 300px; }

#yt-initial-state {
    text-align: center; padding: 50px 20px; color: #6b7280; background: #fff;
    border-radius: 10px; border: 2px dashed #d1d5db; font-size: 1.1rem;
}

.yt-results-header { margin-bottom: 15px; }
.yt-badge { font-weight: 700; color: #374151; font-size: 1.1rem; }

/* Result Card Design */
.yt-result-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

/* Card Sections (Title, Desc, Tags) */
.yt-card-section {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
    position: relative; /* For copy button positioning */
}
.yt-card-section:last-child { border-bottom: none; }

.yt-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: 5px;
}

.yt-text-content {
    font-size: 0.95rem;
    color: #1f2937;
    line-height: 1.5;
    padding-right: 60px; /* Space for button */
    white-space: pre-wrap;
}

.yt-title-text { font-weight: 700; font-size: 1.1rem; color: #111827; }
.yt-tags-text { color: #2563eb; }

/* Small Copy Button inside sections */
.yt-copy-btn-sm {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #4b5563;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.yt-copy-btn-sm:hover { background: #e5e7eb; color: #111827; }

/* Loading */
.yt-skeleton-card {
    height: 150px; margin-bottom: 20px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%; animation: yt-loading 1.5s infinite; border-radius: 10px;
}
@keyframes yt-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Error */
#yt-error-msg {
    background: #fee2e2; color: #b91c1c; padding: 15px; border-radius: 8px;
    margin-top: 20px; border: 1px solid #fca5a5;
}

@media (max-width: 768px) {
    .yt-tool-container { flex-direction: column; }
}
