:root {
    --text-color: #4A5D4E; /* Dark olive green */
    --light-green: #E8EDE6;
    --bg-color: #FDFBF7; /* Off-white cream paper color */
    --font-cursive: 'Great Vibes', cursive;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
}

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

body {
    background-color: #f2efe9; /* Subtler dark frame for desktop */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--text-color);
    padding: 15px; /* Spacing for PC */
}

/* Card layout that scales perfectly */
.card {
    background-color: var(--bg-color);
    width: 100%;
    max-width: 650px;
    position: relative;
    padding: 8vh 6vw; /* Responsive padding */
    text-align: center;
    overflow: hidden; /* Keeps leaves inside */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Responsive Leaves */
.leaf-top-left {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 35%;
    max-width: 220px;
    height: auto;
    transform: rotate(180deg);
    mix-blend-mode: multiply;
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
}

.leaf-bottom-right {
    position: absolute;
    bottom: -5%;
    right: -5%;
    width: 35%;
    max-width: 220px;
    height: auto;
    mix-blend-mode: multiply;
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
}

/* All content needs to be above leaves */
header, main {
    position: relative;
    z-index: 2;
}

.cursive-title {
    font-family: var(--font-cursive);
    font-size: clamp(3rem, 8vw, 4.5rem); /* Fluid typography */
    font-weight: 400;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.2;
}

.names {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
    color: var(--text-color);
}

.intro-text {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    line-height: 1.6;
    margin-bottom: 35px;
    letter-spacing: 0.5px;
}

.details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(0.9rem, 3vw, 1.05rem);
    letter-spacing: 1px;
    text-align: left;
}

.icon {
    width: 28px;
    height: 28px;
    stroke: var(--text-color);
    flex-shrink: 0;
}

.cursive-subtitle {
    font-family: var(--font-cursive);
    font-size: clamp(2.2rem, 6vw, 3rem);
    font-weight: 400;
    margin-bottom: 40px;
    line-height: 1.2;
}

/* Upload Section */
.upload-box {
    border: 1px dashed rgba(74, 93, 78, 0.5);
    border-radius: 8px;
    padding: 30px 15px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 100%;
    margin: 0 auto;
}

.upload-box:hover, .upload-box.dragover {
    background: var(--light-green);
    border-color: var(--text-color);
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 12px;
}

.upload-box h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.upload-box p {
    font-size: 0.85rem;
    color: #666;
}

#file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.upload-item {
    background: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
    text-align: left;
    font-family: var(--font-sans);
}

.upload-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.file-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65%;
}

.file-status {
    font-size: 0.8rem;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--text-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.success { color: #4A5D4E; }
.error { color: #dc3545; }

.storage-info {
    margin-top: 30px;
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    font-family: var(--font-sans);
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    body {
        padding: 0; /* Remove body padding so card touches edges like a native app */
        background-color: var(--bg-color); /* Blend background */
    }
    .card {
        border-radius: 0;
        box-shadow: none;
        padding: 10vw 6vw;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .upload-box {
        padding: 25px 10px;
    }
}
