/* YouTube Tag Extractor - Professional Styles */
.youtube-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.youtube-wrapper {
    max-width: 1300px;
    margin: 0 auto;
}

.youtube-title {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.youtube-icon {
    font-size: 2.8rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.youtube-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-family: 'Poppins', sans-serif;
}

.youtube-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* Tabs */
.youtube-tabs {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    flex-wrap: wrap;
}

.method-tab {
    background: transparent;
    border: none;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 30px;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.method-tab.active {
    background: var(--primary);
    color: white;
}

.method-tab:hover:not(.active) {
    background: var(--bg);
    color: var(--primary);
}

/* Method Panels */
.method-panel {
    display: none;
    margin-bottom: 1.5rem;
}

.method-panel.active {
    display: block;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.youtube-label {
    font-weight: 600;
    color: var(--text);
}

.input-actions-mini {
    display: flex;
    gap: 0.5rem;
}

.mini-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.mini-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.youtube-input {
    width: 100%;
    padding: 0.9rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: monospace;
}

.youtube-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.youtube-textarea {
    width: 100%;
    padding: 0.9rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    resize: vertical;
}

.channel-options {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.limit-select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    color: var(--text);
}

.api-notice {
    background: var(--bg);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    background: var(--bg);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Action Buttons */
.youtube-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.primary-action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.primary-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99,102,241,0.3);
}

.action-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.secondary-action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.8rem;
    width: 100%;
}

/* Tags Result Area */
.youtube-tags-result {
    background: var(--bg);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.result-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

.result-stats {
    display: flex;
    gap: 0.8rem;
}

.stat-badge {
    background: var(--surface);
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.tags-cloud {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.2rem;
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    border: 1px solid var(--border);
}

.tag-item {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.tag-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.empty-message {
    color: var(--text-light);
    text-align: center;
    width: 100%;
}

.tag-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.small-outline-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.small-outline-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Analysis Panel */
.youtube-analysis {
    background: var(--bg);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.analysis-card {
    background: var(--surface);
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.analysis-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.analysis-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
}

/* History Section */
.youtube-history {
    background: var(--bg);
    border-radius: 20px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.youtube-history h3 {
    margin-bottom: 0.8rem;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
}

.history-item:hover {
    background: var(--surface);
}

.history-tags {
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

/* Tips Section */
.youtube-tips {
    margin-bottom: 1.5rem;
}

.youtube-tips h3 {
    margin-bottom: 1rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.tip-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid var(--border);
    text-align: center;
}

.tip-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.5rem;
}

.tip-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--primary);
}

.tip-card p {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* SEO Content */
.youtube-seo {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: var(--surface);
    border-radius: 20px;
}

.feature-list {
    padding-left: 1.2rem;
    margin-top: 0.8rem;
}

.feature-list li {
    margin-bottom: 0.4rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.api-note {
    margin-top: 1rem;
    padding: 0.8rem;
    background: var(--bg);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Download Card */
.download-card-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.download-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 24px;
    padding: 2rem;
    max-width: 500px;
    margin: auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.dark-mode .download-card {
    background: linear-gradient(135deg, #1e1e2e, #2d2d44);
}

.download-card-header, .download-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.download-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
}

.download-logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.download-card-body {
    position: relative;
    z-index: 1;
}

.download-calculator-type {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

.download-calculation {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.4rem 0;
    color: var(--text);
}

.download-result-box {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 16px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.download-result-value {
    color: white;
    font-weight: bold;
    word-break: break-word;
}

.download-explanation {
    background: var(--bg);
    padding: 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    margin: 0.8rem 0;
}

.download-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.download-input-item {
    background: var(--bg);
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
}

.download-input-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-light);
}

.download-input-value {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.8rem;
}

.download-brand {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .youtube-container {
        padding: 0 1rem;
    }
    
    .youtube-title {
        font-size: 2rem;
    }
    
    .method-tab {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    
    .youtube-card {
        padding: 1.2rem;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}