/* YouTube Niche Validator - Frontend Styles */

* {
    box-sizing: border-box;
}

html, body {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.youtube-niche-validator-container {
    background-color: #ffffff;
    color: #000000;
    padding: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

.ynv-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Typography */
.youtube-niche-validator-container h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #000000;
    line-height: 1.2;
}

.youtube-niche-validator-container h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #000000;
}

.youtube-niche-validator-container h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: #000000;
}

.youtube-niche-validator-container h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #000000;
}

.youtube-niche-validator-container p {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #000000;
    line-height: 1.6;
}

.youtube-niche-validator-container a {
    color: #FF0000;
    text-decoration: none;
    font-weight: 500;
}

.youtube-niche-validator-container a:hover {
    text-decoration: underline;
}

/* Header */
.ynv-header {
    margin-bottom: 40px;
    text-align: center;
}

.ynv-header h1 {
    margin-bottom: 12px;
}

.ynv-subtitle {
    font-size: 16px;
    color: #666666;
    margin: 0;
}

/* Steps */
.ynv-step {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.ynv-step:last-of-type {
    border-bottom: none;
}

.ynv-step-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.ynv-step-number {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #666666;
    text-transform: uppercase;
    margin-top: 2px;
}

.ynv-step-description {
    font-size: 14px;
    color: #666666;
    margin: 8px 0 20px 0;
}

/* Form Groups */
.ynv-form-group {
    margin-bottom: 20px;
}

.ynv-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000000;
    font-size: 14px;
}

.ynv-input-field {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #d0d0d0;
    font-family: inherit;
    line-height: 1.5;
}

.ynv-input-field:focus {
    outline: none;
    border-color: #FF0000;
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.1);
}

.ynv-input-field::placeholder {
    color: #999999;
}

.ynv-help-text {
    font-size: 13px;
    color: #666666;
    margin-top: 8px;
    line-height: 1.5;
}

.ynv-help-text a {
    color: #FF0000;
    text-decoration: none;
}

.ynv-help-text a:hover {
    text-decoration: underline;
}

/* Buttons */
.ynv-button {
    display: inline-block;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
}

.ynv-button-primary {
    background-color: #FF0000;
    color: #ffffff;
    width: 100%;
    margin-top: 10px;
}

.ynv-button-primary:hover {
    background-color: #cc0000;
}

.ynv-button-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.ynv-button-secondary {
    background-color: #ffffff;
    color: #FF0000;
    border: 2px solid #FF0000;
    padding: 10px 30px;
    width: auto;
}

.ynv-button-secondary:hover {
    background-color: #fff5f5;
}

.ynv-button-secondary:disabled {
    border-color: #cccccc;
    color: #cccccc;
    cursor: not-allowed;
}

/* Loading State */
.ynv-loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: #000000;
}

.ynv-loading.active {
    display: block;
}

.ynv-spinner {
    border: 3px solid #f0f0f0;
    border-top: 3px solid #FF0000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Results Section */
.ynv-results {
    display: none;
    margin-top: 40px;
}

.ynv-results.active {
    display: block;
}

.ynv-result-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ynv-result-header h2 {
    margin-top: 0;
    font-size: 24px;
}

.ynv-result-subtitle {
    font-size: 14px;
    color: #666666;
    margin: 8px 0 0 0;
}

.ynv-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
    font-size: 16px;
}

/* Top Format Section */
.ynv-top-format {
    background-color: #ffffff;
    padding: 30px;
    margin-bottom: 30px;
}

.ynv-top-format h3 {
    margin-top: 0;
    font-size: 20px;
    color: #000000;
}

/* Viability Box */
.ynv-viability-box {
    background-color: #f9f9f9;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #FF0000;
}

.ynv-viability-score {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.ynv-viability-label {
    font-size: 12px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.ynv-viability-description {
    margin: 0;
    font-size: 14px;
    color: #000000;
}

/* Metrics Grid */
.ynv-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.ynv-metric-box {
    background-color: #f9f9f9;
    padding: 20px;
    text-align: center;
}

.ynv-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #FF0000;
    margin-bottom: 8px;
}

.ynv-metric-label {
    font-size: 12px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* Format Info */
.ynv-format-info {
    background-color: #f9f9f9;
    padding: 15px 20px;
    margin-top: 20px;
    font-size: 14px;
}

.ynv-format-info p {
    margin: 8px 0;
}

.ynv-format-info strong {
    color: #000000;
}

/* Channels Section */
.ynv-channels-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.ynv-channels-section h3 {
    margin-top: 0;
    font-size: 18px;
}

.ynv-channels-description {
    font-size: 14px;
    color: #666666;
    margin-bottom: 25px;
}

/* Channel Card */
.ynv-channel-card {
    background-color: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
}

.ynv-channel-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.ynv-channel-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #FF0000;
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ynv-channel-info {
    flex: 1;
}

.ynv-channel-info h4 {
    margin: 0 0 5px 0;
}

.ynv-channel-info h4 a {
    color: #FF0000;
}

.ynv-channel-subs {
    font-size: 13px;
    color: #666666;
    margin: 0;
}

/* Channel Videos */
.ynv-channel-videos {
    margin-top: 15px;
}

.ynv-videos-label {
    font-size: 12px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.ynv-video-item {
    background-color: #ffffff;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.ynv-video-title {
    flex: 1;
    font-size: 13px;
    color: #FF0000;
    text-decoration: none;
    word-break: break-word;
}

.ynv-video-title:hover {
    text-decoration: underline;
}

.ynv-video-views {
    font-size: 12px;
    color: #666666;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Error Message */
.ynv-error {
    background-color: #fff5f5;
    border-left: 4px solid #FF0000;
    padding: 15px;
    margin-bottom: 20px;
    color: #000000;
    display: none;
}

.ynv-error.active {
    display: block;
}

.ynv-error p {
    margin: 0;
    font-size: 14px;
}

/* Info Section */
.ynv-info-section {
    background-color: #ffffff;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid #f0f0f0;
}

.ynv-info-section h3 {
    margin-top: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ynv-wrapper {
        padding: 20px 15px;
    }

    .youtube-niche-validator-container h1 {
        font-size: 28px;
    }

    .youtube-niche-validator-container h2 {
        font-size: 18px;
    }

    .ynv-step-header {
        flex-direction: column;
        gap: 8px;
    }

    .ynv-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .ynv-top-format {
        padding: 20px;
    }

    .ynv-channel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ynv-channel-rank {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .ynv-video-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .ynv-video-views {
        white-space: normal;
    }

    .ynv-button-primary {
        padding: 14px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .ynv-metrics-grid {
        grid-template-columns: 1fr;
    }

    .ynv-metric-value {
        font-size: 24px;
    }
}

/* No Dark Mode Override */
@media (prefers-color-scheme: dark) {
    .youtube-niche-validator-container {
        background-color: #ffffff !important;
        color: #000000 !important;
    }

    .youtube-niche-validator-container * {
        background-color: inherit !important;
        color: #000000 !important;
    }

    .youtube-niche-validator-container a {
        color: #FF0000 !important;
    }

    .ynv-input-field {
        background-color: #ffffff !important;
        color: #000000 !important;
        border-color: #d0d0d0 !important;
    }

    .ynv-input-field:focus {
        border-color: #FF0000 !important;
    }

    .ynv-step {
        border-bottom-color: #f0f0f0 !important;
    }

    .ynv-viability-box {
        background-color: #f9f9f9 !important;
    }

    .ynv-metric-box {
        background-color: #f9f9f9 !important;
    }

    .ynv-format-info {
        background-color: #f9f9f9 !important;
    }

    .ynv-channel-card {
        background-color: #f9f9f9 !important;
    }

    .ynv-video-item {
        background-color: #ffffff !important;
    }
}

/* Print Styles */
@media print {
    .ynv-button,
    .ynv-form {
        display: none;
    }
}
