body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.2em;
    margin-bottom: 5px;
}

h2 {
    font-size: 1.3em;
    color: #666;
    margin-top: 0;
    margin-bottom: 15px;
}

.authors {
    margin: 10px 0;
}

.authors a {
    margin: 0 7px;
    color: #0366d6;
    text-decoration: none;
}

.affiliation {
    color: #666;
}

.buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.btn {
    padding: 8px 16px;
    margin: 0 10px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.primary {
    background-color: #0366d6;
    color: white;
}

.secondary {
    background-color: white;
    color: #0366d6;
    border: 1px solid #0366d6;
}

.teaser-image {
    width: 100%;
    margin-bottom: 15px;
}

.caption {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 30px;
}

#abstract, #video, #resultGallery, #citation, #acknowledgements {
    margin-top: 40px;
}

#abstract p, #acknowledgements p {
    font-size: 0.95em;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column */
    gap: 20px;
}

.result video, .result img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    object-fit: cover;
    margin-bottom: 10px;
}

.result-buttons {
    display: flex;
    justify-content: flex-start; /* Align buttons to the left */
    gap: 10px; /* Add some space between the buttons */
}

.result-buttons .btn {
    text-align: center; /* Center the text inside buttons */
}

pre {
    background-color: #f6f8fa;
    border-radius: 3px;
    padding: 15px;
    overflow-x: auto;
    font-size: 0.85em;
}

code {
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

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

.modal-content {
    background-color: transparent;
    margin: 5% auto; /* Reduced top margin for better centering */
    padding: 20px;
    border: none;
    width: 90%;
    max-width: 800px;
    position: relative;
}

.close {
    color: #fff;
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

#modalVideo, #modalImage {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}



@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    .buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        margin-bottom: 10px;
    }
}

/* Update mobile app section layout */
.app-container {
    display: grid;
    grid-template-columns: 1fr 260px 260px;  /* Text column + two fixed-width video columns */
    gap: 2rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    
}

.app-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.app-logo {
    width: 100px;  /* Restrict logo size */
    height: 100px;
}

.app-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.app-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-videos {
    width: 280px;  /* Fixed width for video columns */
}

.app-videos .video-wrapper {
    width: 100%;
    aspect-ratio: 9/19.5;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
}

.app-videos .video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 968px) {
    .app-container {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .app-info {
        text-align: center;
        align-items: center;
        max-width: 600px;
    }
    
    .app-videos {
        width: 240px;
    }
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

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

.contact-info {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem;
    line-height: 1.6;
}

.contact-info p {
    margin: 1rem 0;
}

.form-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.form-container iframe {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
}