.container {
    max-width: 100vw;
    margin: 0 auto;
    padding: 0 20px;
}

/* Mobile First Base Styles */
.board-header {
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    color: #333;
    text-align: center;
    display: block;
}
.mascot, h1{
    width: 100%;
    display: block;
}

/* Barevná témata */
.theme-yellow .board-header { background: linear-gradient(135deg, #FFCB2B 0%, #FFA500 100%); }
.theme-blue .board-header { background: linear-gradient(135deg, #4A90E2 0%, #1E5F99 100%); color: white; }
.theme-green .board-header { background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%); color: white; }
.theme-pink .board-header { background: linear-gradient(135deg, #FF69B4 0%, #C71585 100%); color: white; }
.theme-purple .board-header { background: linear-gradient(135deg, #9C27B0 0%, #6A1B9A 100%); color: white; }
.theme-orange .board-header { background: linear-gradient(135deg, #FF9800 0%, #E65100 100%); color: white; }

/* Masonry layout - Masonry.js + imagesLoaded */
.posts-grid {
    margin-bottom: 5rem;
}

/* Mobil - 1 sloupec */
.post-card {
    width: 100%;
    margin-bottom: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    position: relative;
    box-sizing: border-box;
}

/* Tablet (600px+) - 2 sloupce */
@media (min-width: 600px) {
    .post-card {
        width: calc(50% - 12px);
        margin-bottom: 1.5rem;
    }
}

/* Desktop (1200px+) - 3 sloupce */
@media (min-width: 1200px) {
    .post-card {
        width: calc(33.333% - 11px);
    }
}

/* Wide (1600px+) - 4 sloupce */
@media (min-width: 1600px) {
    .post-card {
        width: calc(25% - 12px);
    }
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pinned-post {
    border: 2px solid #FFD700;
    background: linear-gradient(to bottom, #FFFDF7 0%, #FFFFFF 100%);
}

.post-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.post-content {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-media {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.post-media img,
.post-media video {
    width: 100%;
    display: block;
    cursor: zoom-in;
}

.post-date {
    font-size: 0.85rem;
    color: #999;
    margin-top: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Add Post Button */
.add-post-button {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFCB2B 0%, #FFA500 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(255, 203, 43, 0.4);
    cursor: pointer;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    z-index: 100;
}

.add-post-button:hover {
    transform: scale(1.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Like Button */
.like-button {
    background: none;
    border: 2px solid #ddd;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.like-button:hover {
    border-color: #FFCB2B;
    background: #fff8e1;
}

.like-button.liked {
    background: #FFCB2B;
    border-color: #ffc107;
    font-weight: 600;
}

.like-button.liked .like-icon {
    color: #e53935;
    animation: likeAnimation 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes likeAnimation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.like-count {
    font-weight: 600;
}

/* Teacher Controls */
.teacher-controls {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.3rem;
    background: rgba(255,255,255,0.8);
    padding: 0.3rem;
    border-radius: 20px;
}

.teacher-controls form {
    margin: 0;
}

.teacher-controls button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.2rem;
    line-height: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 85vh;
    animation: zoom 0.3s;
    border-radius: 8px;
}

@keyframes zoom {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 50px;
}

@media (min-width: 600px) {
    .add-post-button {
        bottom: 2rem;
        right: 2rem;
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .modal-content {
        padding: 2rem;
    }

    .lightbox-content {
        max-width: 90%;
    }

    .lightbox-close {
        top: 20px;
        right: 40px;
        font-size: 40px;
    }

    .lightbox-caption {
        width: 80%;
    }
}

iframe{
    width: 100%;
    height: auto;
}

@media (min-width: 768px) {
    iframe{
        height: 260px;
    }
}