:root {
    --rain-color: rgba(255, 255, 255, 0.3);
    --raindrop-width: 2px;
    --raindrop-height: 20px;
    --raindrop-speed: 0.5s;
    --raindrop-count: 150;
    --transition-point: 70vh;
    --gradient-start: #000011; /* Darkest at top (night sky) */
    --gradient-end: #000018;   /* Slightly tinted near horizon (subtle glow) */
}

/* Ensure page background matches carousel background */
html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    color: white;
    background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background 1.5s ease;
}

/* Vignette effect */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0; /* Above starfield and rain, but below content and header */
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 70%);
}

/* Rain Effect */
.rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: -2;
    overflow: visible;
}

/* Make content scrollable */
.content-wrapper {
    position: relative;
    z-index: 4; /* Highest level for main content to appear above mountains */
    padding: 2rem;
    margin-top: 4rem; /* Account for fixed header */
    padding-bottom: 140px; /* Increased to prevent content from being hidden behind mountains */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: calc(100vh - 4rem);
    overflow-y: auto;
    box-sizing: border-box;
}

/* Raindrops */
.raindrop {
    position: absolute;
    top: -20px;
    background: var(--rain-color);
    border-radius: 50%;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(250vh);
    }
}

/* Header Styles */
header {
    width: 100%;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 70%);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Main Content */
main {
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

/* Profile Picture */
.profile-container {
    margin: 2rem 0;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Text Elements */
.artist-name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.artist-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-style: italic;
}

.icon-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.icon-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    transition: background 0.3s, transform 0.3s;
}

.icon-links a:hover {
    background: rgba(0,150,255,0.2);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0,150,255,0.5);
}

/* Divider */
.divider {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    margin: 2rem auto;
    border-radius: 2px;
}

/* About Me Section */
.about-me {
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    opacity: 0.9;
    position: relative;
    z-index: 5; /* Ensure it's above everything */
}

/* Commissions Section */
.commissions {
    margin: 3rem 0;
    text-align: center;
}

.commissions h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.commission-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.commission-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    width: 280px;
    height: 400px;              /* was min-height — now definite */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.card-image {
    flex: 0 0 300px;             /* fixed height, no grow/shrink ambiguity */
    height: 300px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: var(--night-sky);
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 12px 12px;
    padding: 0.5rem;
    text-align: center;
}

.card-info h3 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    color: #FFD700;
}

.card-info .price {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
    color: #90EE90;
}

/* Carousel */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    border-radius: 12px 12px 0 0;
    /* Ensure background matches page to hide any corners during animation */
    background: var(--night-sky);
    transform: translateZ(0);
    /* Preserve 3D transforms of children */
    transform-style: preserve-3d;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 0;
    will-change: transform;
    background-color: var(--night-sky);
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--night-sky);
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.carousel-nav button {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.carousel-nav button:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Extras Section */
.extras {
    margin: 3rem 0;
    text-align: center;
}

.extras h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.extras table {
    width: 80%;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.extras td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.extras tr:last-child td {
    border-bottom: none;
}

.extras td:last-child {
    text-align: right;
    font-weight: bold;
    color: #90EE90;
}

/* Button Row */
.button-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}
.placeholder-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    border: none;
    padding: 1rem 2rem;
    border-radius: 20px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    text-decoration: none;
}
.placeholder-btn:hover {
    background: rgba(0,150,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0,150,255,0.5);
    border-color: rgba(0,150,255,0.5);
}

/* Divider inside placeholder buttons */
.placeholder-btn .divider {
    width: 1px;
    height: 1.4em;
    background: rgba(255,255,255,0.3);
    margin: 0 0.25rem;
}

/* Footer */
footer {
    width: 100%;
    position: relative;
    background: #00000a; /* Darkest base */
    color: #eee;
    padding: 3rem 0 0 0; /* Only top padding, bottom padding moved to content */
    text-align: center;
    overflow: visible;
    height: auto;
    min-height: 120px; /* Ensure minimum height for footer base */
    z-index: 1; /* Behind mountain range and footer content */
}

/* Footer content wrapper */
footer .footer-content {
    position: relative;
    z-index: 3; /* Above mountains, below main content */
    padding: 0 0 3rem 0; /* Bottom padding here to match original */
}

/* Footer links */
footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
footer .footer-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    transition: text-decoration 0.2s;
}
footer .footer-links a:hover {
    text-decoration: underline;
}

/* Mountain Range Container */
.mountain-container {
    position: relative;
    height: 140px; /* Increased height */
    margin-top: -140px; /* Increased negative margin to match increased height */
    z-index: 2; /* Below main content, above footer */
    pointer-events: none;
    overflow: hidden;
}

/* Mountain Layers */
.mountain-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px; /* Increased height */
    pointer-events: none;
    overflow: hidden;
}
.mountain-layer.far {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="140"><polygon points="0,140 87.5,20 175,140 225,20 300,140 375,20 450,140 525,20 600,140" fill="%23000005" opacity="0.9"/></svg>') repeat-x;
    background-size: cover;
}
.mountain-layer.mid {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="140"><polygon points="0,140 116.7,0 233.3,140 350,0 466.7,140 583.3,0 700,140" fill="%23000008" opacity="0.9"/></svg>') repeat-x;
    background-size: cover;
}
.mountain-layer.near {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="140"><polygon points="0,140 175,0 350,140 525,0 700,140" fill="%2300000b" opacity="0.9"/></svg>') repeat-x;
    background-size: cover;
}

/* Star Field */
.star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -3;
    overflow: hidden;
}
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle ease-in-out infinite;
}

/* Twinkle animation */
@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* Above everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent background scroll when modal is open */
    background-color: rgba(0,0,0,0.5); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* Reduced top margin for better mobile fit */
    padding: 25px;
    border: 1px solid #888;
    width: 90%; /* Wider on mobile */
    max-width: 500px;
    position: relative;
   border-radius: 12px;
    color: #333;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    max-height: 85vh; /* Maximum height to prevent overflow */
    overflow-y: auto; /* Scrollable content if exceeds max-height */
}
.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
}

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