/* css/components.css */

/* Buttons */
.btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    font-size: var(--font-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: #0891b2;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-xs);
    transition: color 0.3s ease;
}

.btn-icon:hover {
    color: var(--primary-color);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.tag {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 9999px;
    font-size: var(--font-sm);
    font-weight: 500;
}

.tag-studium { 
    background: rgba(6, 182, 212, 0.2); 
    color: var(--primary-color); 
}

.tag-smartdevices { 
    background: rgba(16, 185, 129, 0.2); 
    color: var(--secondary-color); 
}

.tag-familie { 
    background: rgba(59, 130, 246, 0.2); 
    color: var(--accent-color); 
}

.tag-coding { 
    background: rgba(168, 85, 247, 0.2); 
    color: var(--purple-color); 
}

/* Blog Cards */
.blog-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow);
}

.blog-card-image {
    height: 200px;
    background: linear-gradient(45deg, rgba(6, 182, 212, 0.2), rgba(16, 185, 129, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-5xl);
}

.blog-card-content {
    padding: var(--spacing-md);
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-sm);
    color: var(--text-muted);
}

.blog-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-lg);
    font-weight: 700;
    transition: color 0.3s ease;
}

.blog-card:hover h3 {
    color: var(--primary-color);
}

.blog-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.blog-tag {
    padding: var(--spacing-xs) var(--spacing-xs);
    background: rgba(75, 85, 99, 0.5);
    border-radius: var(--radius-xs);
    font-size: var(--font-xs);
    color: var(--text-secondary);
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input, 
.form-textarea, 
.form-select {
    width: 100%;
    padding: var(--spacing-sm);
    background: var(--surface-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--font-sm);
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-input::placeholder, 
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.form-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

/* Login Form */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.login-form {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--spacing-lg);
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: var(--font-2xl);
    font-weight: bold;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.login-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.login-help {
    font-size: var(--font-sm);
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--spacing-sm);
}

/* Admin Components */
.post-list {
    max-width: 1200px;
    margin: 0 auto;
}

.post-item {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.post-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.post-item-content {
    flex: 1;
}

.post-item-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.post-item h3 {
    font-size: var(--font-lg);
    font-weight: bold;
    color: var(--text-primary);
}

.status-badge {
    padding: var(--spacing-xs);
    border-radius: var(--radius-xs);
    font-size: var(--font-xs);
    font-weight: 500;
}

.status-published {
    background: rgba(16, 185, 129, 0.2);
    color: var(--secondary-color);
}

.status-draft {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.post-item-actions {
    display: flex;
    gap: var(--spacing-xs);
    margin-left: var(--spacing-sm);
}

/* Editor Components */
.editor-form {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-lg);
}

.preview-panel {
    background: rgba(31, 41, 55, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-lg);
    max-height: 80vh;
    overflow-y: auto;
}

.preview-title {
    font-size: var(--font-lg);
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

/* Post Content Styling */
.post-content h1 {
    font-size: var(--font-3xl);
    font-weight: bold;
    margin: var(--spacing-lg) 0 var(--spacing-sm);
    color: var(--primary-color);
}

.post-content h2 {
    font-size: var(--font-2xl);
    font-weight: bold;
    margin: var(--spacing-md) 0 var(--spacing-sm);
    color: var(--secondary-color);
}

.post-content h3 {
    font-size: var(--font-xl);
    font-weight: bold;
    margin: var(--spacing-sm) 0 var(--spacing-xs);
    color: var(--accent-color);
}

.post-content p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.post-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.post-content em {
    color: var(--text-secondary);
    font-style: italic;
}

.post-content code {
    background: #1f2937;
    padding: 0.125rem var(--spacing-xs);
    border-radius: var(--radius-xs);
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: var(--font-sm);
}

.post-content pre {
    background: #111827;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    margin: var(--spacing-sm) 0;
    overflow-x: auto;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--secondary-color);
    font-size: var(--font-sm);
}

.post-content ul, 
.post-content ol {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
    color: var(--text-secondary);
}

.post-content li {
    margin-bottom: var(--spacing-xs);
}

.blog-card-image {
    height: 200px;
    background: linear-gradient(45deg, rgba(6, 182, 212, 0.2), rgba(16, 185, 129, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-5xl);
    overflow: hidden;
}

/* Echte Bilder */
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

/* Kategorie-Emoji Fallback */
.blog-card-image .category-emoji {
    font-size: var(--font-5xl);
}

/* Featured Image in Post Header */
.post-featured-image {
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.post-featured-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .post-featured-image {
        margin-bottom: 1.5rem;
        border-radius: var(--radius-md);
    }
    
    .post-featured-image img {
        height: 200px;
    }
}

/* App Rating Grid Styles */
.app-rating-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.app-rating-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.app-rating-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.app-rating-card.top-pick {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(16, 185, 129, 0.05));
}

.app-rating-card.top-pick::before {
    content: "👑";
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

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

.app-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.rating-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rating-badge.must-have {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
}

.rating-badge.game-changer {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    color: white;
}

.rating-badge.specialized {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
}

.rating-badge.solid {
    background: linear-gradient(45deg, #06b6d4, #0891b2);
    color: white;
}

.rating-badge.free {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
}

.rating-badge.premium {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
}

.rating-details {
    margin-bottom: 1rem;
}

.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.rating-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.rating-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stars {
    font-size: 1rem;
    letter-spacing: 1px;
}

.rating-comment {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    background: rgba(75, 85, 99, 0.1);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-rating-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .app-rating-card {
        padding: 1rem;
    }
    
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .rating-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
    .app-rating-card {
        background: var(--surface-dark);
    }
    
    .rating-comment {
        background: rgba(255, 255, 255, 0.05);
    }
}

.hero-logo {
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-brand-logo {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.footer-logo {
    opacity: 0.8;
    transition: opacity 0.3s ease;
    width: 128px; 
    height: 128px;
}

.footer-logo:hover {
    opacity: 1;
}

/* Screen Reader Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}