:root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-color: #2c3e50;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #74ebd5 0%, #9face6 100%);
    min-height: 100vh;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 1200px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Front Page Layout */
.front-page {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Presentation Layout using CSS Grid */
.presentation-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 30px;
}

.pres-title {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pres-details {
    grid-column: 1 / 2;
    font-size: 1.2em;
    line-height: 1.8;
}

.pres-media {
    grid-column: 2 / 3;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Aligns to bottom right as per sketch */
}

.pres-media img, .pres-media video {
    max-width: 100%;
    border-radius: 8px;
    border: 2px solid var(--glass-border);
}

.pres-author {
    grid-column: 1 / -1;
    font-size: 1.1em;
    font-style: italic;
    margin-top: 20px;
}

/* Admin Form */
.admin-form { display: flex; flex-direction: column; gap: 15px; }
.admin-form input, .admin-form textarea, .admin-form select {
    padding: 10px; border-radius: 8px; border: 1px solid #ccc; width: 100%;
}
.btn {
    padding: 12px 24px; border: none; border-radius: 8px;
    background: #2980b9; color: white; cursor: pointer; font-size: 1em; transition: 0.3s;
}
.btn:hover { background: #3498db; }

/* Responsive Viewports */
@media (max-width: 768px) {
    .presentation-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }
    .pres-details, .pres-media { grid-column: 1 / -1; }
    .pres-media { align-items: center; }
}

/* Footer Styles */
.pres-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    margin-top: 10px;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a, .footer-btn {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1em;
}

.footer-links a:hover, .footer-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* YouTube Video Modal Styles */
.video-modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Dark overlay */
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    padding: 5px;
}

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

.close-modal:hover { color: #ccc; }

.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: none;
}

@media (max-width: 600px) {
    .pres-footer { flex-direction: column; gap: 15px; }
}

/* Presentations Grid Layout */
.presentations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
    margin-top: 20px;
}

/* Individual Presentation Card */
.presentation-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.presentation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(31, 38, 135, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.presentation-card h3 {
    margin: 10px 0;
    font-size: 1.4em;
    color: var(--text-color);
}

.presentation-card p {
    font-size: 0.9em;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes the button to the bottom */
}

/* Standardize Media Thumbnails */
.card-media {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.card-media img, .card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures media fills the box without distorting */
}