/* PianoWeb Transfer — Stile ispirato a pianoweb.eu */

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

:root {
    /* Palette PianoWeb */
    --navy:        #0a192f;
    --navy-light:  #112240;
    --navy-lighter:#233554;
    --cyan:        #64ffda;
    --cyan-dark:   #4cdbc0;
    --blue:        #00bcd4;
    --blue-dark:   #0097a7;
    --white:       #ffffff;
    --gray:        #8892b0;
    --gray-light:  #a8b2d1;
    --bg:          #0a192f;
    --bg-card:     #112240;
    --border:      #233554;
    --radius:      12px;
    --shadow:       0 10px 40px rgba(0,0,0,.3);
    --glow:        0 0 20px rgba(100, 255, 218, .15);
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--navy);
    min-height: 100vh;
    color: var(--gray-light);
    overflow-x: hidden;
}

/* Digital particles background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(100, 255, 218, .03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 188, 212, .03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: var(--white); }

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,.08);
}

.logo-link { display: flex; align-items: center; }
.pianoweb-logo {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.header-right { display: flex; align-items: center; gap: 1rem; }

.btn-primary {
    background: var(--cyan);
    color: var(--navy);
    padding: .6rem 1.4rem;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 700;
    transition: all .3s ease;
}
.btn-primary:hover {
    background: var(--blue-dark);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-secondary {
    padding: .55rem 1.3rem;
    border: 1px solid var(--navy);
    border-radius: 6px;
    color: var(--navy);
    font-size: .9rem;
    font-weight: 600;
    transition: all .3s ease;
}
.btn-secondary:hover {
    background: var(--navy);
    color: var(--white);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem 2rem;
    overflow: hidden;
}

.digital-grid {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(100, 255, 218, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 255, 218, .03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--gray);
    font-size: 1.15rem;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}
.stat {
    text-align: center;
}
.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--cyan);
}
.stat-label {
    font-size: .85rem;
    color: var(--gray);
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 900px) {
    .main-container { grid-template-columns: 1fr; }
    .hero-stats { gap: 2rem; }
}

/* ── Upload card ─────────────────────────────────────────────────────────── */
.upload-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.upload-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(100, 255, 218, .03) 0%, transparent 70%);
    pointer-events: none;
}

/* Dropzone */
#dropzone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all .3s ease;
    position: relative;
    background: rgba(17, 34, 64, .5);
}
#dropzone.drag-over {
    border-color: var(--cyan);
    background: rgba(100, 255, 218, .05);
    box-shadow: var(--glow);
}
#dropzone:hover {
    border-color: var(--cyan);
}

.upload-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: var(--navy);
    box-shadow: var(--glow);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(100, 255, 218, .2); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(100, 255, 218, .4); }
}

#dropzone h3 {
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
    color: var(--white);
}

.upload-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}
.btn-file {
    background: var(--cyan);
    color: var(--navy);
}
.btn-folder {
    background: transparent;
    border: 1px solid var(--cyan);
    color: var(--cyan);
}
.btn-file, .btn-folder {
    padding: .65rem 1.6rem;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
}
.btn-file:hover {
    background: var(--white);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}
.btn-folder:hover {
    background: rgba(100, 255, 218, .1);
}

.upload-limits {
    font-size: .85rem;
    color: var(--gray);
    line-height: 1.7;
}

/* File list */
#file-list { margin-top: 1.5rem; }
.file-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1rem;
    background: rgba(17, 34, 64, .7);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: .5rem;
    font-size: .875rem;
    transition: all .2s ease;
}
.file-item:hover {
    border-color: var(--cyan);
    background: rgba(100, 255, 218, .05);
}

.file-item-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--navy);
    font-size: .7rem;
    flex-shrink: 0;
    text-transform: uppercase;
    font-weight: 700;
}

.file-item-name {
    flex: 1;
    font-weight: 500;
    color: var(--white);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-item-size { color: var(--gray); font-size: .8rem; flex-shrink: 0; }
.file-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    font-size: 1.1rem;
    transition: all .2s;
}
.file-item-remove:hover { color: #ef4444; transform: scale(1.2); }

/* Options */
#upload-options { margin-top: 1.5rem; }
.option-row {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.option-row label {
    font-size: .875rem;
    font-weight: 500;
    color: var(--gray);
    min-width: 85px;
}
.checkbox-row {
    margin-top: 1.2rem;
    width: 100%;
}
.upload-checkbox {
    width: 100%;
    justify-content: flex-start;
}
.upload-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--cyan);
}
.upload-checkbox span {
    font-size: .85rem;
    color: var(--gray);
}
.upload-checkbox a {
    color: var(--cyan);
}
.upload-checkbox a:hover {
    text-decoration: underline;
}

select, input[type="password"], textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .6rem 1rem;
    font-size: .875rem;
    color: var(--white);
    background: rgba(17, 34, 64, .7);
    outline: none;
    transition: all .2s ease;
    font-family: inherit;
    width: 100%;
}
select:focus, input[type="password"]:focus, textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(100, 255, 218, .1);
}
select option { background: var(--navy); color: var(--white); }
textarea { min-height: 80px; resize: vertical; }

.btn-send {
    width: 100%;
    margin-top: 1.2rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: var(--navy);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .3s ease;
}
.btn-send:hover {
    box-shadow: var(--glow);
    transform: translateY(-2px);
}
.btn-send:active { transform: scale(.98); }
.btn-send:disabled { opacity: .5; cursor: not-allowed; }

/* Progress */
#upload-progress { margin-top: 1.5rem; }
.progress-label {
    font-size: .875rem;
    color: var(--gray);
    margin-bottom: .5rem;
    display: flex;
    justify-content: space-between;
}
.progress-bar-wrap {
    height: 10px;
    background: var(--navy-lighter);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: .6rem;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    border-radius: 99px;
    transition: width .3s ease;
    width: 0;
    box-shadow: 0 0 10px rgba(100, 255, 218, .5);
}
.progress-file-name { font-size: .85rem; color: var(--gray); }

/* Success */
#upload-success { margin-top: 1.5rem; text-align: center; }
.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--cyan);
    animation: successPop .5s ease;
}
@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}
.success-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: .3rem;
}
.success-sub { font-size: .9rem; color: var(--gray); margin-bottom: 1.5rem; }

.share-box {
    display: flex;
    gap: .5rem;
    background: var(--navy-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .5rem;
    align-items: center;
}
.share-url {
    flex: 1;
    border: none;
    background: transparent;
    font-size: .9rem;
    color: var(--cyan);
    font-weight: 500;
    outline: none;
    padding: 0 .5rem;
}
.btn-copy {
    background: var(--cyan);
    color: var(--navy);
    border: none;
    border-radius: 7px;
    padding: .5rem 1.2rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s ease;
    flex-shrink: 0;
}
.btn-copy:hover { background: var(--white); }

.btn-new {
    margin-top: 1rem;
    background: transparent;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    border-radius: 9px;
    padding: .6rem 1.4rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}
.btn-new:hover { background: rgba(100, 255, 218, .1); }

/* ── Review Badge ───────────────────────────────────────────────────────── */
.review-badge {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(100, 255, 218, .05), rgba(0, 188, 212, .05));
    border: 1px solid rgba(100, 255, 218, .2);
    border-radius: 12px;
    text-align: center;
}
.review-logo {
    height: 35px;
    width: auto;
    margin-bottom: .8rem;
}
.review-stars {
    font-size: 1.2rem;
    margin-bottom: .5rem;
}
.review-text {
    font-size: .85rem;
    color: var(--gray);
    line-height: 1.6;
}
.review-text a {
    color: var(--cyan);
    font-weight: 600;
}
.review-text a:hover {
    text-decoration: underline;
}

/* ── Features panel ──────────────────────────────────────────────────────── */
.features-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.features-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .4rem;
    color: var(--white);
}
.features-card > p {
    font-size: .85rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: .85rem;
    border-radius: 10px;
    margin-bottom: .4rem;
    transition: all .2s ease;
}
.feature-item:hover {
    background: rgba(100, 255, 218, .03);
}
.feature-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 1.1rem;
}
.feature-text strong {
    display: block;
    font-size: .9rem;
    margin-bottom: .2rem;
    color: var(--white);
}
.feature-text span { font-size: .8rem; color: var(--gray); }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Auth pages ──────────────────────────────────────────────────────────── */
.auth-wrap {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
}
.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: .3rem;
    color: var(--white);
}
.auth-card .auth-sub {
    color: var(--gray);
    font-size: .875rem;
    margin-bottom: 2rem;
}
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: .4rem;
    color: var(--gray);
}
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--white);
    background: rgba(17, 34, 64, .7);
    outline: none;
    transition: all .2s ease;
}
.form-group input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(100, 255, 218, .1);
}

/* Checkbox styling */
.checkbox-group {
    margin-top: 1.5rem;
}
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    cursor: pointer;
    font-size: .85rem;
    color: var(--gray);
    line-height: 1.5;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--cyan);
}
.checkbox-label a {
    color: var(--cyan);
    text-decoration: underline;
}
.checkbox-label a:hover {
    color: var(--white);
}
.btn-auth {
    width: 100%;
    padding: .85rem;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: var(--navy);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: .5rem;
    transition: all .3s ease;
}
.btn-auth:hover {
    box-shadow: var(--glow);
    transform: translateY(-2px);
}
.auth-alt {
    text-align: center;
    margin-top: 1.2rem;
    font-size: .875rem;
    color: var(--gray);
}
.alert {
    padding: .85rem 1rem;
    border-radius: 8px;
    font-size: .875rem;
    margin-bottom: 1.2rem;
}
.alert-error {
    background: rgba(239, 68, 68, .1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, .3);
}
.alert-success {
    background: rgba(100, 255, 218, .1);
    color: var(--cyan);
    border: 1px solid rgba(100, 255, 218, .3);
}

/* ── Download page ──────────────────────────────────────────────────────── */
.download-wrap {
    max-width: 680px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}
.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}
.download-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.download-header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 1.6rem;
}
.download-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}
.download-meta {
    font-size: .85rem;
    color: var(--gray);
    margin-top: .2rem;
}
.download-message {
    background: rgba(100, 255, 218, .05);
    border-left: 3px solid var(--cyan);
    padding: 1rem 1.2rem;
    border-radius: 0 10px 10px 0;
    font-size: .9rem;
    margin-bottom: 1.5rem;
    color: var(--gray);
}
.file-download-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: .6rem;
    transition: all .2s ease;
}
.file-download-item:hover {
    border-color: var(--cyan);
    background: rgba(100, 255, 218, .03);
}
.file-download-name {
    flex: 1;
    font-size: .9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--white);
}
.file-download-size {
    font-size: .8rem;
    color: var(--gray);
    flex-shrink: 0;
}
.btn-dl {
    background: var(--cyan);
    color: var(--navy);
    border: none;
    border-radius: 7px;
    padding: .5rem 1rem;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .2s ease;
    text-decoration: none;
    display: inline-block;
}
.btn-dl:hover {
    background: var(--white);
    transform: translateY(-1px);
}
.btn-dl-all {
    width: 100%;
    margin-top: 1.2rem;
    padding: .85rem;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: var(--navy);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
}
.btn-dl-all:hover {
    box-shadow: var(--glow);
    transform: translateY(-2px);
}
.expired-msg {
    text-align: center;
    color: #ef4444;
    font-weight: 600;
    padding: 2rem 0;
}

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.dashboard-wrap {
    max-width: 900px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}
.dashboard-header { margin-bottom: 2rem; }
.dashboard-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
}
.dashboard-header p { color: var(--gray); font-size: .875rem; }
.transfer-row {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: .9rem;
    display: flex;
    gap: 1.2rem;
    align-items: center;
    flex-wrap: wrap;
    transition: all .2s ease;
}
.transfer-row:hover {
    border-color: var(--cyan);
    box-shadow: var(--glow);
}
.transfer-row-info { flex: 1; }
.transfer-row-token {
    font-weight: 700;
    font-size: .95rem;
    color: var(--cyan);
}
.transfer-row-meta {
    font-size: .8rem;
    color: var(--gray);
    margin-top: .2rem;
}
.badge {
    padding: .3rem .75rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-ready {
    background: rgba(100, 255, 218, .15);
    color: var(--cyan);
}
.badge-expired {
    background: rgba(239, 68, 68, .15);
    color: #ef4444;
}
.badge-pending {
    background: rgba(251, 191, 36, .15);
    color: #fbbf24;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 3rem 2rem;
    font-size: .85rem;
    color: var(--gray);
    border-top: 1px solid var(--border);
    background: var(--navy-light);
    margin-top: 4rem;
}
.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.footer-brand strong { color: var(--white); }
.footer-brand span { color: var(--gray); }
.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.footer-links span { color: var(--gray); }

/* ── Animations ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
    .upload-card, .features-card, .auth-card {
        animation: fadeInUp .6s ease;
    }
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .hero-stats { flex-direction: column; gap: 1rem; }
    .upload-btns { flex-direction: column; }
    .btn-file, .btn-folder { width: 100%; }
    .share-box { flex-direction: column; }
    .btn-copy { width: 100%; }
}
