/* ====
   PROTEGEIX.ME - Estils Moderns i Minimalistes
   Fons negre amb accents blavosos
   ==== */

/* Reset i variables */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #6b7280;
    --accent-blue: #3b82f6;
    --accent-blue-light: #60a5fa;
    --accent-blue-dark: #2563eb;
    --success: #10b981;
    --success-light: #34d399;
    --error: #ef4444;
    --error-light: #fca5a5;
    --warning: #f59e0b;
    --border-color: #2a2a2a;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container principal */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    width: 100%;
}

/* Header */
header {
    text-align: center;
    padding: 20px 20px 10px;
    background: transparent;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 0;
    animation: fadeInDown 0.6s ease-out;
}

.logo {
    width: 200px;
    height: 200px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: -20px;
    transition: transform 0.3s ease;
}

h1 {
    font-size: 2.8em;
    font-weight: 700;
    margin-top: -10px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.15em;
    font-weight: 600;
    margin-top: -5px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Cards amb efecte glassmorphism */
.card {
    background: rgba(21, 21, 21, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease-out;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

/* Form elements */
.form-group {
    margin-bottom: 28px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
    letter-spacing: 0.3px;
}

textarea,
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 16px;
    background: transparent !important;
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

textarea {
    resize: vertical;
    min-height: 180px;
    line-height: 1.6;
}

textarea:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-blue-light);
    background: transparent !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

textarea::placeholder,
input::placeholder {
    color: var(--text-tertiary);
}

textarea.error {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Comptador de caràcters */
.char-counter {
    text-align: right;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 8px;
    font-weight: 500;
}

.char-counter.warning {
    color: var(--warning);
    font-weight: 600;
}

.char-counter.error {
    color: var(--error);
    font-weight: 600;
}

/* Select */
select {
    width: 100%;
    padding: 14px 16px;
    background: transparent !important;
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    font-size: 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px;
}

select:focus {
    outline: none;
    border-color: var(--accent-blue-light);
    background: transparent !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    cursor: pointer;
}

input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--accent-blue);
    border-radius: 6px;
}

.checkbox-group label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
}

.password-field {
    display: none;
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
}

.password-field.show {
    display: block;
}

/* Contenidor dels botons */
.buttons-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

/* Botó d'opcions avançades */
.advanced-options-btn {
    width: auto;
    height: 45px;
    padding: 10px 15px;
    background: transparent;
    color: var(--accent-blue-light);
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
    letter-spacing: 0.3px;
}

.advanced-options-btn:hover {
    border-color: var(--accent-blue-light);
    color: white;
    background: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.advanced-options-btn .arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.advanced-options-btn.active .arrow {
    transform: rotate(180deg);
}

/* Contenidor d'opcions avançades */
.advanced-options {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease;
    opacity: 0;
    order: 2;
}

.advanced-options.show {
    max-height: 600px;
    opacity: 1;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Botó de crear enllaç */
#createBtn {
    flex: 1;
    max-width: 300px;
    padding: 18px;
    background: transparent;
    color: var(--accent-blue-light);
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
    letter-spacing: 0.3px;
}

/* Botons */
button {
    width: 100%;
    padding: 18px;
    background: transparent;
    color: var(--accent-blue-light);
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
    letter-spacing: 0.3px;
}

button:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Resultat amb animació i ocultació del formulari */
.result {
    display: none;
    margin-top: 0;
    padding: 32px;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success);
    border-radius: 12px;
    animation: fadeIn 0.4s ease;
}

.result.show {
    display: block;
}

/* Amagar formulari quan es mostra el resultat */
.card.result-active .form-group,
.card.result-active .buttons-container,
.card.result-active .alert,
.card.result-active .tabs-container,
.card.result-active #fileInputSection {
    display: none !important;
}

.result h3 {
    color: var(--success-light);
    margin-bottom: 12px;
    font-size: 1.3em;
    text-align: center;
}

.result p {
    color: var(--success);
    margin-bottom: 12px;
    text-align: center;
}

/* Link display - Botons alineats */
.link-display {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 12px;
    width: 100%;
    align-items: stretch;
}

.link-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 200px;
    padding: 14px 16px;
    background: #0a0a0a !important;
    border: 2px solid var(--success) !important;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #ffff !important;
    font-family: 'Courier New', monospace;
}

.link-input:focus {
    outline: none;
    background: #0a0a0a !important;
    border-color: var(--success-light) !important;
}

/* Botó de copiar */
.copy-btn {
    padding: 14px 20px;
    background: transparent;
    color: var(--success-light);
    border: 2px solid var(--success);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
    flex-shrink: 0;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: var(--success);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Botó de WhatsApp - VERD, no blau */
.whatsapp-btn {
    width: auto;
    padding: 14px 20px;
    background: transparent;
    color: #25d366 !important;
    border: 2px solid #25d366 !important;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.whatsapp-btn:hover {
    background: #25d366 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}


/* Text de cremar secret */
.burn-secret-text {
    text-align: center;
    color: var(--warning);
    font-size: 15px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 12px;
}

/* Botó de cremar secret */
.burn-secret-btn {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--error-light);
    border: 2px solid var(--error);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
    margin-bottom: 12px;
}

.burn-secret-btn:hover {
    background: var(--error);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Botó per crear nou missatge dins del resultat */
.result .new-message-btn {
    margin-top: 20px;
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--accent-blue-light);
    border: 2px solid var(--accent-blue);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.result .new-message-btn:hover {
    background: var(--accent-blue);
    color: white;
}

/* Botó d'eliminar secret - VERMELL */
/* Botó d'eliminar secret - VERMELL i QUADRAT com el de compartir */
.burn-btn {
    width: 64px;
    height: 60px;
    padding: 0;
    background: transparent;
    color: var(--error) !important;
    border: 2px solid var(--error) !important;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    font-size: 24px;
}

.burn-btn:hover {
    background: var(--error) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.burn-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Features grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 40px;
    padding: 0 10px;
}

.feature {
    text-align: center;
    padding: 32px 24px;
    background: rgba(21, 21, 21, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-4px);
    border-color: var(--accent-blue);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
}

.feature-icon {
    font-size: 64px !important;
    line-height: 64px !important;
    height: 64px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.3));
}

.feature-icon svg,
.feature-icon img {
    width: 64px !important;
    height: 64px !important;
}

.feature-icon-img {
    width: 64px !important;
    height: 64px !important;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.feature h3 {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
    font-weight: 500;
}

.alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid var(--error);
    color: var(--error-light);
}

.alert.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Message display */
.message-display {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 24px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
}

.message-display.file-view {
    white-space: normal;
    /* Override pre-wrap for files */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}

.info-box {
    background: rgba(245, 158, 11, 0.15);
    border: 2px solid var(--warning);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    color: var(--warning);
    font-weight: 500;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--accent-blue);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

/* Password prompt */
.password-prompt {
    display: none;
}

.password-prompt.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

.password-prompt h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.password-prompt p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Igualar alçada dels camps de contrasenya i caducitat */
#password,
#unlockPassword {
    height: 45px;
    padding: 10px 15px;
}

#expiration {
    height: 45px;
    padding: 10px 15px;
}

/* Botó de compartir - Mateix estil que WhatsApp però blau */
.share-btn {
    width: auto;
    padding: 14px 20px;
    background: transparent;
    color: var(--accent-blue-light) !important;
    border: 2px solid var(--accent-blue) !important;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}

.share-btn:hover {
    background: var(--accent-blue) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.share-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Menú desplegable de compartir */
.share-menu {
    position: absolute;
    top: calc(100% + -350px);
    right: -140px;
    left: auto;
    background: #151515;
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.share-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: left;
}

.share-option:hover {
    background: var(--bg-tertiary);
    color: var(--accent-blue-light);
}

.share-option svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.share-option[data-platform="telegram"] svg {
    width: 24px !important;
    height: 24px !important;
    margin-left: -3px;
}

/* Footer */
footer {
    text-align: center;
    padding: 50px 20px 30px;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

footer a {
    color: var(--accent-blue-light);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

footer a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

footer strong {
    color: var(--text-primary);
}

/* Pantalla de confirmació */
.confirmation-screen {
    display: none;
    text-align: center;
    padding: 10px 20px 20px;
}

.confirmation-screen.show {
    display: block;
}

.confirmation-icon {
    font-size: 48px;
    margin-bottom: 5px;
    margin-top: 0;
    animation: pulse 2s ease-in-out infinite;
}

.confirmation-screen h2 {
    color: #e5e7eb;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
}

.confirmation-message {
    color: #9ca3af;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.warning-box {
    display: none !important;
}

.confirmation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: transparent;
    color: #9ca3af;
    border: 1px solid #374151;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #1f2937;
    border-color: #4b5563;
    color: #e5e7eb;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Reduir espai vertical total de la pantalla de confirmació */
#viewSecret {
    padding: 10px !important;
    margin-top: 0 !important;
}

#viewSecret .card {
    padding: 15px !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

/* Reduir espai superior del body quan es visualitza un secret */
body:has(#viewSecret[style*="display: block"]) {
    padding-top: 5px !important;
}

/* Ajustar contenidor principal */
body:has(#viewSecret[style*="display: block"]) .container {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Animacions */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2em;
        margin-top: 0px;
    }

    .subtitle {
        font-size: 0.8em;
        margin-bottom: -10px;
    }

    .card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature {
        padding: 24px 20px;
    }

    /* Botons en línia al mòbil */
    .link-display {
        flex-wrap: wrap;
        gap: 12px;
    }

    .link-input {
        width: 100%;
        font-size: 14px;
        padding: 14px 12px;
        min-width: 0;
        flex: 1 1 100%;
    }

    .copy-btn {
        padding: 14px 16px;
        font-size: 15px;
        flex: 1 1 0;
        min-width: 0;
    }

    .share-btn {
        width: 64px !important;
        height: 60px !important;
        padding: 0 !important;
        flex: 0 0 auto;
    }

    .share-btn svg {
        width: 20px;
        height: 20px;
    }

    .burn-btn {
        width: 64px !important;
        height: 60px !important;
        padding: 0 !important;
        font-size: 22px;
        flex: 0 0 auto;
    }

    .whatsapp-btn {
        padding: 14px 16px;
        width: auto !important;
        flex: 0 0 auto;
    }

    .whatsapp-btn svg {
        width: 22px;
        height: 22px;
    }

    header {
        padding: 10px 20px 30px;
    }

    .logo {
        width: 110px;
        height: 110px;
        margin-top: -30px;
        margin-bottom: -15px;
    }

    button {
        padding: 16px;
        font-size: 16px;
    }

    footer {
        padding: 40px 20px 20px;
    }

    /* Reordenar elements al mòbil */
    .buttons-container {
        flex-direction: column;
        gap: 0;
    }

    .advanced-options-btn {
        width: 100%;
        order: 1;
        margin-bottom: 0;
    }

    .advanced-options {
        order: 2;
        margin-top: 0 !important;
    }

    .advanced-options.show {
        margin-top: 12px !important;
        margin-bottom: 12px !important;
    }

    #createBtn {
        width: 100%;
        max-width: none;
        order: 3;
        margin-top: 12px;
    }

    /* Al mòbil, centrem el menú */
    .share-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }

    .share-menu.show {
        transform: translateX(-50%) translateY(0);
    }

    /* Ajustos per pantalla de confirmació */
    .confirmation-screen {
        padding: 8px 15px 12px !important;
    }

    .confirmation-icon {
        font-size: 25px !important;
        margin-bottom: 10px !important;
    }

    .confirmation-screen h2 {
        font-size: 20px !important;
    }

    .confirmation-message {
        font-size: 13px !important;
    }

    .warning-box {
        padding: 10px 12px !important;
    }

    .warning-box p,
    .warning-box li {
        font-size: 12px !important;
        margin-bottom: 4px !important;
        line-height: 1.0 !important;
    }

    /* Per mòbil - encara més compacte */
    #viewSecret {
        padding: 5px !important;
    }

    #viewSecret .card {
        padding: 12px !important;
        margin-bottom: 15px !important;
    }

    body:has(#viewSecret[style*="display: block"]) .container {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    .card {
        padding: 24px 16px;
    }

    textarea {
        min-height: 150px;
    }

    .feature-icon {
        font-size: 2.5em;
    }
}

/* Millores d'accessibilitat */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mode alt contrast */
@media (prefers-contrast: high) {
    :root {
        --border-color: #4a4a4a;
        --text-secondary: #d0d0d0;
    }
}

/* ====
   NOU: Estils per Pestanyes i Pujada de fitxers
   ==== */

/* Tabs */
.tabs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    border-bottom: none;
    /* Removed separator */
    padding-bottom: 0px;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Very subtle, thin crisp line */
    color: var(--text-secondary);
    padding: 10px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    font-weight: 500;
    position: relative;
    border-radius: 8px;
    /* Rounded pill shape */
    margin-bottom: 0;
    box-shadow: none !important;
    /* Force remove any shadow */
    backdrop-filter: none;
    /* Ensure no blur effect */
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    /* Slight hover effect */
    border-color: var(--text-secondary);
    transform: none;
    box-shadow: none;
}

.tab-btn.active {
    background: rgba(59, 130, 246, 0.15);
    /* Full background for active */
    color: var(--accent-blue-light);
    font-weight: bold;
    border: 1px solid var(--accent-blue);
    /* Full border */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    overflow: visible;
    /* Ensure badge is not clipped */
    /* Subtle glow */
}

.warning-file-box {
    background-color: rgba(234, 179, 8, 0.1);
    /* Yellow/Orange Tint */
    border: 1px solid rgba(234, 179, 8, 0.5);
    color: #fca5a5;
    /* Light Redish/Orange Text */
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto 15px auto;
}

/* File Drop Zone */
.file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.file-drop-zone .icon {
    font-size: 48px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.file-drop-zone p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.file-drop-zone .link {
    color: var(--accent-blue-light);
    text-decoration: underline;
    font-weight: 600;
}

.limit-info {
    font-size: 13px;
    color: var(--text-tertiary) !important;
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--accent-blue);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

.file-preview span {
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-preview button {
    background: transparent;
    border: none;
    color: var(--error-light);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    width: auto;
    box-shadow: none;
}

.file-preview button:hover {
    color: var(--error);
    transform: scale(1.1);
    background: transparent;
    box-shadow: none;
}