/* ============================================================================
   Tauschbörse - Mobile-First CSS
   ============================================================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --secondary-color: #34a853;
    --secondary-light: #81c995;
    --accent-color: #fbbc04;
    --success-color: #34a853;
    --danger-color: #ea4335;
    --warning-color: #fbbc04;
    --whatsapp-color: #25D366;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e8eaed;
    --text-color: #202124;
    --text-light: #5f6368;
    --text-muted: #80868b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
}

.site-header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
    margin-bottom: 5px;
}

.site-header .tagline {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

header nav {
    margin: 15px 0;
}

header nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.button:hover::before {
    width: 300px;
    height: 300px;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.button:active {
    transform: translateY(0);
}

.button-primary {
    background: var(--gradient-primary);
    font-weight: 700;
}

.button-secondary {
    background: var(--text-light);
}

.button-success {
    background: var(--gradient-success);
}

.button-danger {
    background: var(--danger-color);
}

.button-whatsapp {
    background: var(--whatsapp-color);
    font-weight: 600;
}

.button-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Forms */
.article-form {
    background: white;
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin: 20px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--card-bg);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 0.85rem;
}

.form-info {
    background: var(--light-bg);
    padding: 20px;
    border-left: 4px solid var(--secondary-color);
    margin: 20px 0;
    border-radius: 5px;
}

.form-info h3 {
    margin-bottom: 10px;
}

.form-info ol {
    margin-left: 20px;
}

/* Image Preview */
.image-preview {
    margin-top: 15px;
}

.image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin: 20px 0;
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
}

.alert ul {
    margin-left: 20px;
}

.alert-error {
    background: #fef2f2;
    border-left-color: var(--danger-color);
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border-left-color: var(--success-color);
    color: #166534;
}

.success-box, .error-box {
    background: white;
    padding: 40px 35px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin: 30px 0;
}

.success-box {
    border-top: 5px solid var(--success-color);
}

.error-box {
    border-top: 5px solid var(--danger-color);
}

.success-message {
    background: white;
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-top: 5px solid var(--success-color);
}

/* Filters */
.filters {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-box input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-options select {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* Result Info */
.result-info {
    text-align: center;
    margin: 20px 0;
    color: var(--text-light);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px 0;
}

@media (min-width: 600px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Article Card */
.article-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.article-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px) scale(1.02);
}

.article-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--light-bg);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-category {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(26, 115, 232, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.article-meta span {
    display: inline-block;
}

.article-description {
    margin-bottom: 15px;
    color: var(--text-color);
}

.trade-wish {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--accent-color);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.no-results h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-link {
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.page-link:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.page-link.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Info Box */
.info-box {
    background: white;
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin: 40px 0;
}

.info-box h2 {
    text-align: center;
    margin-bottom: 35px;
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 700;
}

.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

.step {
    text-align: center;
}

.step-number {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.step h3 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 700px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--danger-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 35px 20px;
    margin-top: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--text-light);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

/* Admin Panel */
.admin-panel {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.article-details {
    margin: 20px 0;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
}

.article-details img {
    display: block;
    margin: 0 auto 20px;
}

.reject-form {
    margin-top: 30px;
}

.reason-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* Delete Confirmation */
.delete-confirmation {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.article-preview {
    margin: 20px 0;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .site-header {
        padding: 25px 15px;
    }
    
    .site-header h1 {
        font-size: 1.6rem;
    }
    
    .article-form {
        padding: 25px 20px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .filter-options {
        flex-direction: column;
    }
    
    .filter-options select {
        width: 100%;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .header-actions .button {
        width: 100%;
    }
    
    .modal-content {
        margin: 10% 10px;
        padding: 25px 20px;
    }
    
    .info-box {
        padding: 25px 20px;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 1.4rem;
    }
}

/* Animationen */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.article-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }

.button-primary:hover {
    animation: pulse 1s infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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