* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.github-link {
    margin-bottom: 1rem;
}

.github-link a {
    display: inline-block;
    background: #333;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.github-link a:hover {
    background: #555;
}

header h1 {
    font-size: 2.5rem;
    color: #222;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

header p {
    color: #555;
    font-size: 1.1rem;
}

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

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: background 0.3s ease;
}

.video-card:hover .play-button {
    background: rgba(0, 0, 0, 0.9);
}

.video-content {
    padding: 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.video-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #2c3e50;
    line-height: 1.3;
}

.video-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.video-reason {
    background: #f8f9fa;
    border-left: 4px solid #333;
    padding: 0.75rem;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #555;
}

.video-reason::before {
    content: "Why I love it: ";
    font-weight: 600;
    color: #333;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 1.7rem;
    }
}

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

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #333;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close:hover {
    background: rgba(255, 255, 255, 1);
}

.modal-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.modal-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Twitter embed specific styles */
.modal-video-container .twitter-tweet {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    min-height: 400px !important;
}

.modal-video-container blockquote.twitter-tweet {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border: none !important;
    background: white !important;
    padding: 20px !important;
}

.modal-info {
    padding: 1.5rem;
    flex-grow: 1;
    background: white;
    min-height: 200px;
    border-top: 1px solid #eee;
}

.modal-info h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.modal-info p {
    margin: 0 0 1rem 0;
    color: #666;
    line-height: 1.5;
    font-size: 1rem;
}

#modal-description {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 1rem;
    color: #333;
}

.modal-info .video-reason {
    margin-top: 1rem;
    background: #e8f4f8;
    border-left: 4px solid #2c3e50;
    padding: 1rem;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #555;
}

.modal-info .video-reason::before {
    content: "Why I love it: ";
    font-weight: 600;
    color: #2c3e50;
    font-style: normal;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-info {
        padding: 1rem;
    }
    
    .modal-info h3 {
        font-size: 1.3rem;
    }
}