:root {
    --bg-dark: #0f1115;
    --primary-purple: #826d90;
    --secondary-green: #62947c;
    --light-purple: #d5bfdc;
    --neon-green: #a8f4ad;
    --card-bg: rgba(25, 28, 35, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(130, 109, 144, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(168, 244, 173, 0.05) 0%, transparent 40%);
    color: white;
    display: flex;
    flex-direction: column;
}

header {
    width: 100%;
    padding: 25px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(213, 191, 220, 0.1);
    backdrop-filter: blur(12px);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ff-icon {
    width: 32px;
    height: 32px;
    background: var(--neon-green);
    border-radius: 50% 50% 10% 50%;
    position: relative;
    box-shadow: 0 0 15px var(--neon-green);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, var(--light-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.donate-btn {
    text-decoration: none;
    color: var(--light-purple);
    background: rgba(130, 109, 144, 0.15);
    padding: 10px 22px;
    border-radius: 12px;
    border: 1px solid rgba(130, 109, 144, 0.3);
    transition: 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}

.donate-btn:hover {
    background: rgba(130, 109, 144, 0.25);
    border-color: var(--light-purple);
    transform: translateY(-1px);
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.card {
    width: 100%;
    max-width: 540px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 2.2rem;
    font-weight: 800;
}

.subtitle {
    text-align: center;
    color: var(--primary-purple);
    margin-bottom: 35px;
    font-weight: 400;
}

.mode-switch {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: 18px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.mode-btn {
    flex: 1;
    border: none;
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    background: transparent;
    color: #71767b;
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.3s;
}

.mode-btn.active {
    background: var(--primary-purple);
    color: white;
    box-shadow: 0 4px 15px rgba(130, 109, 144, 0.3);
}

.upload-area {
    width: 100%;
    border: 2px dashed rgba(168, 244, 173, 0.2);
    border-radius: 24px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    margin-bottom: 25px;
    display: block;
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--neon-green);
    background: rgba(168, 244, 173, 0.03);
}

.upload-area input {
    display: none;
}

.upload-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-purple);
    margin-bottom: 6px;
}

.upload-subtitle {
    color: var(--secondary-green);
    font-size: 0.9rem;
}

.file-selected {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--neon-green);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.selectors {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group label {
    color: var(--primary-purple);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select,
input[type="text"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    outline: none;
    padding: 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    transition: 0.3s;
}

select option {
    background: #1a1d24;
}

select:focus,
input[type="text"]:focus {
    border-color: var(--primary-purple);
}

.convert-btn {
    width: 100%;
    border: none;
    outline: none;
    padding: 18px;
    border-radius: 18px;
    background: var(--neon-green);
    color: var(--bg-dark);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 10px 20px -5px rgba(168, 244, 173, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(168, 244, 173, 0.4);
    filter: brightness(1.1);
}

.convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Progress bar */
.progress-wrap {
    display: none;
    margin-top: 20px;
}

.progress-wrap.visible {
    display: block;
}

.progress-label {
    font-size: 0.85rem;
    color: var(--secondary-green);
    margin-bottom: 8px;
    text-align: center;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--neon-green);
    border-radius: 99px;
    width: 0%;
    transition: width 0.4s ease;
    box-shadow: 0 0 8px var(--neon-green);
}

.progress-bar-fill.indeterminate {
    width: 40%;
    animation: indeterminate 1.4s ease-in-out infinite;
}

@keyframes indeterminate {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(350%);
    }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(12px);
    animation: toastIn 0.3s ease;
    pointer-events: auto;
}

.toast.success {
    background: rgba(168, 244, 173, 0.15);
    border: 1px solid rgba(168, 244, 173, 0.3);
    color: var(--neon-green);
}

.toast.error {
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff9090;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.info {
    margin-top: 25px;
    text-align: center;
    color: var(--secondary-green);
    font-size: 0.85rem;
    opacity: 0.8;
}

#urlMode {
    display: none;
}

@media(max-width:600px) {
    header {
        padding: 20px;
    }

    .card {
        padding: 25px;
        border-radius: 24px;
    }

    .selectors {
        flex-direction: column;
    }
}

/* Estilos extra para el modo OCR */
#ocrMode textarea:focus {
    border-color: var(--primary-purple);
    outline: none;
}

#ocrMode textarea::-webkit-scrollbar {
    width: 6px;
}

#ocrMode textarea::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 10px;
}

.btnCopiado {
    background: var(--secondary-green) !important;
    color: white !important;
    border-color: var(--neon-green) !important;
}

#btnCopiar {
    display: flex;
    transition: all 0.3s ease;
}

.logo-container img {
    border-radius: 10px;
    width: 50px;
    height: 50px;
}