* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background: white;
    min-height: 100vh;
    position: relative;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    z-index: 100;
}

.top-bar.visible {
    transform: translateY(0);
}

.top-bar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.top-bar-icon {
    height: 3rem;
    width: auto;
    transition: transform 0.2s ease;
}

.top-bar-icon:hover {
    transform: scale(1.1);
}

.tabs {
    display: inline-flex;
    gap: 4px;
    background: #e4e4e4;
    padding: 4px;
    border-radius: 6px;
    width: fit-content;
}

.tab {
    padding: 8px 16px;
    border: none;
    background: none;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.tab:hover {
    color: #333;
}

.tab.active {
    background: white;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.language-selector-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    gap: 8px;
    width: fit-content;
}

.language-icon {
    width: 16px;
    height: 16px;
}

.language-selector {
    padding: 0.5rem;
    padding-right: 2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
}

.language-selector:hover {
    border-color: #999;
}

.piru-page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
    min-height: calc(100vh - 60px);
    padding-top: calc(60px + 2rem);
    background: white;
}

.phone-container {
    width: 311px;
    height: 600px;
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.phone-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: white;
    z-index: 10; /* Ensure nav stays on top */
}

.phone-nav img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    cursor: pointer;
}

.phone-nav img:hover {
    opacity: 1;
}

.phone-logo {
    width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.phone-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    border-top: 1px solid #eee;
}

.phone-footer img {
    width: 24px;
    height: 24px;
    opacity: 0.6;
}

.carousel-container {
    flex: 1;
    max-width: 600px;
    height: 600px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.carousel-wrapper {
    height: 100%;
    display: flex;
    transition: transform 0.3s ease;
}


.carousel-image {
    flex: 0 0 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-controls {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.carousel-controls button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-controls button:hover {
    background: white;
    transform: scale(1.1);
}

.chevron-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background-image: url('chevron.svg');
    background-repeat: repeat;
    background-size: 1518px 100px;
    opacity: 0.3;
}

/* Add exact phone layout sections */
.phone-status-bar {
    height: 24px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #333;
    margin-top: 0.5rem;
}

.status-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wifi-icon {
    width: 18px;
    height: 18px;
    margin-bottom: -2px;
}

.phone-header {
    padding: 1rem;    
    max-height: 100px;  /* Added */
    display: flex;  /* Added */
    align-items: center;  /* Added */
    justify-content: center;  /* Added */
}

.phone-header img {
    width: calc(100% - 2rem);
    height: auto;
    object-fit: contain;
    display: block;
    filter: invert(77%) sepia(14%) saturate(1017%) hue-rotate(179deg) brightness(96%) contrast(90%);
    pointer-events: none;
 }

 .phone-content {
    padding: 1rem;
    padding-bottom: calc(50px + 1rem); /* 50px is nav height + 1rem extra space */
    height: calc(100% - 120px);
    overflow-y: auto;
}

.phone-content h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: none;
    color: #333;
}

.introduction {
    margin-bottom: 2rem;
}

.introduction p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.likes-dislikes {
    margin-top: 1rem;
}

.likes-dislikes h3 {
    font-size: 0.9rem;
    margin: 1rem 0 0.5rem 0;
    color: #666;
}

.likes-dislikes ul {
    list-style: none;
    padding-left: 0.5rem;
}

.likes-dislikes li {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    color: #333;
}

.likes-dislikes li::before {
    content: "•";
    color: #666;
    margin-right: 0.5rem;
}

.page {
    display: none;
    width: 100%;
    min-height: 100vh;
    position: absolute; /* Add this */
    top: 0; /* Add this */
    left: 0; /* Add this */
    right: 0; /* Add this */
}

.page.active {
    display: block;
    position: relative; /* Add this */
}

.page[data-page="releases"] {
    padding-top: 120px; /* Adjust this from 80px to 120px */
    background: white;
}

.releases-content-wrapper {
    position: relative;
    background: white;
    min-height: calc(100vh - 80px);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1;
    padding: 2rem;
}

.logo {
    width: calc(100% - 4rem);
    height: auto;
    object-fit: contain;
    max-height: 90vh;
    transition: transform 0.5s ease;
}

.content-wrapper {
    position: relative;
    z-index: 2;
    margin-top: 100vh;
    background: white;
}

.releases-content-wrapper {
    position: relative;
    z-index: 2;
    margin-top: 80px;
    background: white;
}

.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.catchphrase {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem;
}

.catchphrase p {
    margin: 0.5rem 0;
    font-size: 1.2rem;
    color: #666;
}

.description {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.description p {
    margin: 0.5rem auto;
    font-size: 1.1rem;
    color: #333;
    line-height: 1.8;
    max-width: 800px;
}

.description-text {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.description-links {
    margin-bottom: 2rem;
}

.description-links a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.description-links a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    transition: transform 0.2s ease;
}

.tracklist {
    white-space: pre-line;
}

.social-links a:hover {
    transform: scale(1.1);
}

.support-button {
  display: inline-block;
  background-color: white;
  color: black;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: Arial, sans-serif;
  transition: background-color 0.2s, border-color 0.2s;
}

.support-button:hover {
  background-color: #f8f8f8;
  border-color: #ccc;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
}

ul {
    list-style-type: none;
}

li {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    position: relative;
}

li::before {
    content: "•";
    position: absolute;
    left: 0;
}

.member {
    cursor: pointer;
    transition: all 0.3s ease;
}

.member:hover {
    color: #666;
}

.member-links {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f5f5f5;
    border-radius: 8px;
    margin-top: 0.5rem;
    margin-left: -1rem;
}

.member-links.expanded {
    max-height: 500px;
    padding: 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.member-links a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 0.5rem;
    margin: 0.25rem 0;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.member-links a:hover {
    background: #eee;
    padding-left: 1rem;
}

.releases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 200px));
    gap: 1rem;
    padding: 1rem;
    max-width: 1000px;
    border: none;
    margin: 0 auto;
    justify-content: center;
    position: relative; /* Added for modal positioning */
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    max-width: 900px; /* Increased for side-by-side layout */
    width: 90%;
    position: relative;
    display: flex;
    gap: 2rem;
    padding: 2rem;
    max-height: 90vh; /* Limit height to prevent overflow */
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 2;
}

.modal-image-container {
    flex: 0 0 400px; /* Fixed width for image side */
}

.expanded-image {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

.expanded-info {
    flex: 1;
    overflow-y: auto; /* Make content scrollable */
    padding-right: 1rem;
}

.expanded-info h3 {
    font-size: 1.8rem;
    font-weight: 500;
}

.release-date {
    color: #666;
    margin-bottom: 1.5rem;
}

.release-card {
    cursor: pointer;
    border: 1px solid #ddd;
}

.release-image {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.release-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.release-info {
    padding: 0.75rem;
}

.release-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
}

.release-info p {
    margin: 0;
    color: #666;
    font-size: 0.8rem;
}

.contact {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    color: #666;
    border-top: 1px solid #eee;
}

.contact a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact a:hover {
    color: #000;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile-first base styles */
@media (max-width: 768px) {
    .top-bar {
        padding: 0.5rem;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .top-bar-logo {
        order: 1;
    }

    .tabs {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .language-selector-wrapper {
        order: 2;
    }

    .top-bar-icon {
        height: 2rem;
    }

    .tab {
        padding: 6px 12px;
        font-size: 0.875rem;
    }

    .content {
        padding-top: 120px; /* Add this */
    }

    /* Adjust hero section */
    .hero {
        height: calc(100vh - 120px);
        padding: 0;
        margin-top: 120px;
    }

    .logo {
        width: 80%;
        height: auto;
        max-height: 50vh;
        object-fit: contain;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        transition: transform 0.3s ease;
    }
    
    /* Adjust scroll behavior */
    .logo.scrolled {
        transform: translate(-50%, -50%) scale(0.9);
    }

    /* Adjust catchphrase */
    .catchphrase p {
        font-size: 1rem;
        margin: 0.25rem 0;
    }

    /* Adjust description */
    .description p {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Adjust section headers */
    h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Adjust member list */
    li {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    /* Adjust release grid */
    .releases-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .release-image {
        height: 150px;
    }

    /* Adjust modal */
    .modal-content {
        flex-direction: column;
        padding: 1rem;
        width: 95%;
        max-height: 95vh;
        overflow-y: auto;
    }

    .modal-image-container {
        flex: none;
        max-width: 100%;
    }

    .piru-page {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
        gap: 1rem;
        padding-top: calc(120px); /* Adjusted from 60px + 1rem */
        min-height: 100vh;
    }
    
    /* Ensure proper stacking and spacing on mobile */
    .page[data-page="piru"] {
        padding-top: 120px; /* Add this */
        background: white;
    }

    .phone-container {
        margin: 0 auto 2rem auto;
    }

    /* Mobile carousel fixes */
    .carousel-container {
        width: 100%;
        height: 300px;
    }

    .carousel-controls button {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .carousel-wrapper {
        width: 100%;
        height: 100%;
        display: flex;
        transition: transform 0.3s ease;
    }

    .carousel-image {
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .carousel-controls {
        position: absolute;
        bottom: 1rem;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        gap: 1rem;
        z-index: 2;
    }

    .modal-overlay {
        z-index: 1001;
    }

    .content-wrapper {
        z-index: 2;
    }


    .carousel-controls button:active {
        transform: scale(0.95);
    }

    /* Adjust spacing for better mobile flow */
    section {
        margin-bottom: 2rem;
    }

    .social-links {
        gap: 0.75rem;
    }

    .member-links.expanded {
        padding: 0.75rem;
    }

    .member-links a {
        padding: 0.375rem;
        font-size: 0.875rem;
    }
}

/* Additional adjustments for very small screens */
@media (max-width: 360px) {
    .top-bar-icon {
        height: 1.75rem;
    }

    .tab {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .language-selector {
        font-size: 0.875rem;
        padding: 0.375rem;
    }

    .carousel-container {
        height: 250px;
    }
}

.tabs a.tab {
    text-decoration: none;
}