/**
 * YAWC Interactive Features Styles
 *
 * Styles for AI Prompts, Cheatsheets, Learning Paths, and Interactive Tools
 */

/* ====================
   AI Prompts
   ==================== */

.yawc-prompt-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.yawc-prompt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.yawc-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.yawc-meta-label {
    font-weight: 600;
    color: #555;
}

.yawc-meta-value {
    color: #333;
}

.yawc-prompt-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.yawc-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.yawc-prompt-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.yawc-copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.yawc-copy-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.yawc-copy-btn.copied {
    background: #10b981;
    border-color: #059669;
}

.yawc-prompt-content {
    padding: 1.5rem;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.yawc-prompt-section {
    margin-top: 2rem;
}

.yawc-prompt-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.yawc-prompt-output,
.yawc-prompt-tips {
    background: #fff9e6;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    border-radius: 4px;
}

/* Rating System */
.yawc-prompt-rating {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.yawc-rating-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.yawc-rating-average {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffc107;
}

.yawc-rating-count {
    color: #666;
    font-size: 0.9rem;
}

.yawc-rating-stars {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    font-size: 2rem;
}

.yawc-star {
    cursor: pointer;
    color: #ddd;
    transition: all 0.2s ease;
    user-select: none;
}

.yawc-star:hover,
.yawc-star.hover {
    color: #ffc107;
    transform: scale(1.2);
}

.yawc-star.filled {
    color: #ffc107;
}

/* ====================
   Cheatsheets
   ==================== */

.yawc-cheatsheet-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.yawc-cheatsheet-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.yawc-cheatsheet-download {
    text-align: center;
    margin: 2rem 0;
}

.yawc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.yawc-download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}

.yawc-cheatsheet-content {
    margin-top: 2rem;
}

/* ====================
   Learning Paths
   ==================== */

.yawc-learning-path-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.yawc-learning-path-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.yawc-learning-path-description {
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.yawc-learning-path-progress h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.yawc-progress-bar-wrapper {
    margin-bottom: 2rem;
}

.yawc-progress-bar {
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.yawc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    border-radius: 15px;
}

.yawc-progress-text {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 600;
    color: #666;
}

.yawc-learning-path-articles {
    list-style: none;
    padding: 0;
    margin: 0;
}

.yawc-path-article {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
    transition: all 0.3s ease;
}

.yawc-path-article:hover {
    background: #e9ecef;
    border-left-color: #667eea;
}

.yawc-path-article.completed {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.yawc-checkbox-wrapper {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.yawc-progress-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.yawc-checkmark {
    display: block;
    width: 24px;
    height: 24px;
    border: 2px solid #667eea;
    border-radius: 6px;
    background: white;
    transition: all 0.3s ease;
}

.yawc-progress-checkbox:checked ~ .yawc-checkmark {
    background: #667eea;
}

.yawc-progress-checkbox:checked ~ .yawc-checkmark:after {
    content: '✓';
    display: block;
    color: white;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
}

.yawc-article-info {
    flex: 1;
}

.yawc-article-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.yawc-article-title:hover {
    color: #667eea;
}

.yawc-article-excerpt {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* ====================
   Interactive Tools
   ==================== */

.yawc-tool-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.yawc-tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.yawc-tool-header h2 {
    margin-bottom: 0.5rem;
}

.yawc-tool-description {
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.yawc-tool-form {
    max-width: 800px;
    margin: 0 auto;
}

.yawc-form-group {
    margin-bottom: 1.5rem;
}

.yawc-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.yawc-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.yawc-form-control:focus {
    outline: none;
    border-color: #667eea;
}

.yawc-textarea {
    min-height: 200px;
    font-family: 'Fira Code', monospace;
    resize: vertical;
}

.yawc-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.yawc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.yawc-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.yawc-tool-result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    display: none;
}

.yawc-tool-result.success {
    background: #f0fdf4;
    border: 2px solid #10b981;
    display: block;
}

.yawc-tool-result.error {
    background: #fef2f2;
    border: 2px solid #ef4444;
    display: block;
}

.yawc-tool-result.warning {
    background: #fffbeb;
    border: 2px solid #f59e0b;
    display: block;
}

.yawc-result-title {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.yawc-result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.yawc-result-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.yawc-result-list li:last-child {
    border-bottom: none;
}

/* ====================
   Code Playground
   ==================== */

.yawc-playground {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
}

.yawc-playground-header {
    background: #2d2d2d;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.yawc-playground-title {
    color: #fff;
    font-weight: 600;
    margin: 0;
}

.yawc-playground-actions {
    display: flex;
    gap: 0.5rem;
}

.yawc-playground-btn {
    background: #3b3b3b;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.yawc-playground-btn:hover {
    background: #4b4b4b;
}

.yawc-playground-editor {
    padding: 1rem;
}

.yawc-playground-output {
    background: #f8f9fa;
    border-top: 2px solid #dee2e6;
    padding: 1rem;
    min-height: 100px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

/* ====================
   Homepage Features
   ==================== */

.yawc-homepage-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 16px;
    margin-bottom: 3rem;
}

.yawc-homepage-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.yawc-homepage-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

.yawc-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.yawc-hero-btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.yawc-hero-btn-primary {
    background: white;
    color: #667eea;
}

.yawc-hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.4);
}

.yawc-hero-btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

.yawc-hero-btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px);
}

.yawc-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.yawc-feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.yawc-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.yawc-feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.yawc-feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #333;
}

.yawc-feature-description {
    color: #666;
    line-height: 1.6;
}

/* ====================
   Responsive
   ==================== */

@media (max-width: 768px) {
    .yawc-prompt-wrapper,
    .yawc-cheatsheet-wrapper,
    .yawc-learning-path-wrapper,
    .yawc-tool-wrapper {
        padding: 1.5rem;
    }

    .yawc-prompt-meta,
    .yawc-cheatsheet-meta,
    .yawc-learning-path-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .yawc-prompt-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .yawc-rating-stars {
        font-size: 1.5rem;
    }

    .yawc-homepage-hero {
        padding: 3rem 1.5rem;
    }

    .yawc-homepage-hero h1 {
        font-size: 1.875rem;
    }

    .yawc-features-grid {
        grid-template-columns: 1fr;
    }

    .yawc-path-article {
        flex-direction: column;
    }
}

/* ====================
   Animations
   ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yawc-animate-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.yawc-loading {
    animation: pulse 1.5s ease-in-out infinite;
}
