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

/* Disable all transitions for instant page loads */
header, header *, .sub-header, .sub-header * {
    transition: none !important;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #fff;
    background-color: #000000;
    background-image: url('../images/lefthandicon.png'), url('../images/righthandicon.png');
    background-position: left 105px, right 105px;
    background-repeat: no-repeat, no-repeat;
    background-size: 300px, 300px;
    background-attachment: fixed, fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 105px;
}

/* Container to constrain width */
.page-container {
    width: 100%;
    max-width: 750px;
    background-color: #000000;
}

/* Header & Navigation */
header {
    background-color: #1a1a1a;
    padding: 0.5rem 0;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

nav {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    flex: 1;
}

.logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4CAF50;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    font-size: 0.9rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #4CAF50;
}

/* Sub-Header */
.sub-header {
    background-color: #111;
    padding: 0.375rem 0;
    border-bottom: 2px solid #0a0a0a;
    width: 100%;
    position: fixed;
    top: 54px;
    left: 0;
    z-index: 999;
}

.category-buttons {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-buttons::-webkit-scrollbar {
    display: none;
}

.category-btn {
    padding: 0.5rem 1rem;
    background-color: #0d0d0d;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: max-content;
}

.category-btn:hover {
    background-color: #1a1a1a;  /* Slightly lighter on hover */
}

.play-btn {
    background-color: #4CAF50;
}

.play-btn:hover {
    background-color: #45a049;
}

/* Main Content */
main {
    min-height: calc(100vh - 120px);
}

/* Hero Section */
.hero {
    max-width: 750px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1rem;
    background: rgba(0, 0, 0, 0.85);
    color: white;
}

.preview-section {
    margin-bottom: 0.5rem;  /* Reduced from 2rem */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
    text-align: center;
}

.preview-section:last-child {
    border-bottom: none;
}

.section-header-link {
    text-decoration: none;
    color: #fff;
    display: block;
}

.section-header-link:hover {
    color: #4CAF50;
}

.section-header-link h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;  /* Further reduced */
    cursor: pointer;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #45a049;
}

/* Sections */
.about-section,
.portfolio-section,
.services-section,
.contact-section {
    max-width: 750px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1rem;
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
}

/* Ensure sections fill to max-width on desktop */
@media (min-width: 769px) {
    .about-section,
    .portfolio-section,
    .services-section,
    .contact-section {
        width: 750px;
    }
}

.about-section h1,
.portfolio-section h1,
.services-section h1,
.contact-section h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;  /* Further reduced */
    text-align: center;
    color: #fff;
}

/* Portfolio Grid */
.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

/* Gallery Grid System */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 5px;
    border: 2px solid #333;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-thumbnail:hover {
    border-color: #4CAF50;
    transform: scale(1.05);
}

.gallery-thumbnail img,
.gallery-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #111;
}

.gallery-thumbnail.video::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-media {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 5px;
}

.lightbox-info {
    margin-top: 1rem;
    text-align: center;
    color: #fff;
}

.lightbox-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.lightbox-info p {
    font-size: 0.9rem;
    color: #aaa;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.media-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.media-item img,
.media-item video {
    width: 100%;
    height: auto;
    border-radius: 5px;
    border: 1px solid #333;
}

.media-item h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-top: 0.5rem;
}

.game-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.game-btn {
    padding: 0.3rem 0.6rem;  /* Reduced from 0.4rem 0.8rem */
    background-color: #4CAF50;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.game-btn:hover {
    background-color: #45a049;
}

.media-item p {
    font-size: 0.9rem;
    color: #aaa;
}

.description-text {
    font-style: italic;
}

/* Custom Audio Player */
.custom-audio-player {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 10px;
    border: 1px solid #333;
    width: 100%;
}

.play-pause-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 3px solid #4CAF50;
    color: #4CAF50;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    align-self: flex-start;
    margin-top: 23px;
}

.play-pause-btn .play-icon,
.play-pause-btn .pause-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

.play-pause-btn:hover {
    border-color: #45a049;
    transform: scale(1.05);
}

.play-pause-btn:active {
    transform: scale(0.95);
}

.player-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.audio-visualizer {
    width: 100%;
    height: 80px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.3);
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-bar {
    height: 8px;
    background-color: #333;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #aaa;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-direction: column;
}

.volume-knob {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 3px solid #4CAF50;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.volume-knob:hover {
    border-color: #45a049;
}

.volume-knob-indicator {
    position: absolute;
    width: 4px;
    height: 20px;
    background: #4CAF50;
    top: 5px;
    left: 50%;
    transform-origin: center 20px;
    transform: translateX(-50%) rotate(0deg);
    border-radius: 2px;
}

.volume-label {
    font-size: 0.7rem;
    color: #aaa;
}

.volume-btn {
    display: none;
}

.volume-slider {
    display: none;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Contact Form */
.contact-form {
    max-width: 100%;
    width: 100%;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    background-color: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
    box-sizing: border-box;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid #333;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #0d0d0d;
    color: #fff;
    font-family: 'Arial', sans-serif;
    transition: border-color 0.3s ease;
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.contact-form textarea {
    min-height: 150px;
    max-height: 300px;
    resize: vertical;
}

.contact-form button {
    padding: 1rem 2rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-form button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.contact-form button:active {
    transform: translateY(0);
}

.contact-form button:disabled {
    background-color: #333;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Adjust top header for mobile */
    header {
        padding: 0.4rem 0;
    }
    
    nav {
        padding: 0 0.5rem;
    }
    
    .logo {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .logo-image {
        width: 35px;
        height: 35px;
    }
    
    .nav-links {
        gap: 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Adjust sub-header position to account for smaller top header */
    .sub-header {
        top: 40px;
        padding: 0.3rem 0;
    }
    
    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}