* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
    background-color: #140404;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: url('bgimage.jpg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    overflow-x: hidden;
}

.blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(26, 25, 25, 0.5);
    backdrop-filter: blur(10px);
    z-index: 5;
    display: none;
}

/* Header */
header {
    background-color: #f2f2f2;
    margin-top: 10px;
    background: rgba(52, 48, 48, 0.85);
    color: #ffffff;
    text-align: center;
    padding: 10px;
    font-size: 26px;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    box-shadow: 0 8px 16px rgba(144, 143, 143, 0.7), 0 -8px 16px rgba(144, 143, 143, 0.7);
}

/* Navigation */
nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 10px;
    margin: 20px auto;
    width: fit-content;
}

nav a {
    color: #e0dede;
    text-decoration: none;
    padding: 10px 20px;
    transition: color 0.3s, background 0.3s;
    border-radius: 8px;
    background: rgba(179, 176, 176, 0.403);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 -8px 16px rgba(255, 255, 255, 0.1);
    margin: 0 10px;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #df973a;
}

/* Main Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.grid-container {
    padding: 10px;
    /* reduced padding */
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 20px;
    /* reduced gap between items */
    width: 100%;
    max-width: 900px;
    /* smaller max-width */
    height: 100%;
    max-height: 400px;
    /* smaller max-height */
    margin: 10px auto;
    /* reduced margin */
}

/* For desktop view - position absolute */
@media (min-width: 769px) {
    .grid-container {
        position: absolute;
        top: 55%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Grid Item */
.grid-item {
    background-color: #ddd;
    background: rgba(223, 220, 220, 0.2);
    color: #dbd9d9;
    padding: 20px;
    /* reduced padding */
    text-align: center;
    font-size: 20px;
    /* smaller font-size */
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3), -5px -5px 15px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s, box-shadow 0.3s, border 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

/* Hover state for Grid Items */
.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 7px 7px 20px rgba(0, 0, 0, 0.4), -7px -7px 20px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

/* Modal styling */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(57, 41, 41, 0.95);
    width: 90%;
    max-width: 420px;
    /* Default for mobile/tablets */
    max-height: 90vh;
    padding: 30px;
    transition: all 0.3s ease;
    border-radius: 16px;
    display: none;
    z-index: 1000;
    color: #fff;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Enlarged modal styling on desktop when the large class is present */
@media (min-width: 769px) {
    .modal.large {
        max-width: 95vw;
        width: 95vw;
        height: 90vh;
    }

    .modal.large .modal-content {
        display: flex;
        width: 100%;
        height: 100%;
        padding: 20px;
        gap: 20px;
    }

    .modal.large #team-info {
        flex: 0 0 300px;
        max-width: 300px;
        padding: 15px 20px;
        background-color: #4d3b3b;
        border-radius: 10px;
        box-shadow: 0 0 15px rgba(221, 220, 220, 0.05) inset;
        overflow-y: auto;
    }

    .modal.large #team-info h2 {
        color: #54daec;
        font-size: 1.8rem;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #ee3521;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .modal.large #team-info #modal-text p {
        font-size: 1.1rem;
        color: #67a6e6;
        font-weight: 500;
        margin-bottom: 10px;
    }

    .modal.large #team-info #modal-text ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }

    .modal.large #team-info #modal-text li {
        padding: 8px 5px;
        margin-bottom: 6px;
        border-left: 3px solid #26ebe8;
        background-color: rgba(25, 42, 7, 0.7);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border-radius: 0 5px 5px 0;
        font-size: 0.95rem;
        transition: all 0.2s ease;
    }

    .modal.large #team-info #modal-text li:hover {
        background-color: #111010;
        border-left-color: #ed3824;
        transform: translateX(3px);
    }

    .modal.large #right-panel .tabs {
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid #ff4430;
    }

    .modal.large .tab-button {
        padding: 8px 15px;
        margin-right: 5px;
        border: none;
        background-color: #050509;
        border-radius: 5px;
        cursor: pointer;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .modal.large .tab-button:hover {
        background-color: #a76009;
    }

    .modal.large .tab-button.active {
        background-color: #1fc0bd;
        color: rgb(0, 0, 0);
    }
}

.modal-content {
    position: relative;
    text-align: left;
}

#modal-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
}

#modal-text p {
    margin-bottom: 12px;
    font-size: 16px;
    color: #cccccc;
}

#modal-text ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

#modal-text li {
    padding: 4px 0;
    font-size: 15px;
    color: #ffffff;
}

/* Tab buttons styling */
.tabs {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-button {
    background-color: rgba(90, 90, 90, 0.5);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.tab-button:hover,
.tab-button.active {
    background-color: rgba(220, 57, 57, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Tab content */
.tab-content {
    display: none;
    margin-top: 10px;
    background-color: #1c1c1c;
    padding: 15px;
    border-radius: 8px;
    min-height: 500px;
    justify-content: center;
    align-items: center;
}

.tab-content.active {
    display: flex;
}

.tab-content iframe {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: none;
}

/* Placeholder text when no preview is available */
.tab-content p {
    color: #999;
    font-size: 16px;
}

/* Close button */
.close-btn {
    position: absolute;
    top: 0.1px;
    right: 1px;
    font-size: 28px;
    color: #ff4d4d;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

/* Optional: subtle fade-in animation */
.modal.fade-in {
    animation: fadeInModal 0.4s ease forwards;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Footer (if needed) */
footer {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ccc;
    text-align: center;
    padding: 16px;
    margin-top: 20px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 -4px 16px rgba(0, 0, 0, 0.1);
}


/* File links */
.file-links {
    margin-top: 20px;
}

.file-links a {
    display: inline-block;
    margin: 0 10px;
    padding: 10px 20px;
    background: #1c1c1c;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background 0.3s;
}

.file-links a:hover {
    background: #333333;
}

/* Tab styling */
.tabs {
    margin-top: 20px;
}

.tab-button {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #e0e0e0;
    cursor: pointer;
    margin: 0 5px;
    border-radius: 5px;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tab-content {
    max-height: 100%;
    margin-top: 15px;
    padding: 15px;
    background: rgb(46, 13, 13);
    border-radius: 8px;
}

@media (max-width: 768px) {
    nav {
        margin: 17px auto;
    }

    .grid-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        max-height: none;
        height: auto;
    }

    .grid-item {
        font-size: 20px;
        padding: 20px;
    }

    main.content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
}

@media (max-width: 400px) {
    .grid-container {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
    }

    header,
    footer {
        font-size: 16px;
        padding: 10px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: space-around;
    }

    nav a {
        margin: 5px;
        padding: 8px 12px;
        font-size: 14px;
    }

    .grid-item {
        font-size: 18px;
        padding: 15px;
    }
}

/* Glassy container for the about section */
.glass-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    max-width: 1300px;
    margin: 10px auto;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.6;
}

