/* ==========================================================================
   Главная: логотип, описание проекта, загрузка файлов и история
   ========================================================================== */

.home {
    padding-bottom: 48px;
}

.home .container {
    max-width: 980px;
}

/* --- Первый экран -------------------------------------------------------- */

.hero {
    padding-top: 36px;
    text-align: center;
}

.hero__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: min(100%, 720px);
    height: 6.5rem;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 7, 58, 0.45));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.35));
}

html[data-theme="light"] .brand-logo {
    filter: drop-shadow(0 4px 12px rgba(225, 29, 72, 0.25));
}

.hero__subtitle {
    margin-bottom: 18px;
    color: var(--text-2);
    font-size: 1.12rem;
    font-weight: 400;
}

.hero__about {
    padding: 16px 26px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fade-up 0.8s ease-out 0.2s both;
}

.hero__about p {
    color: var(--text-2);
    line-height: 1.6;
}

.hero__divider {
    width: 60px;
    height: 1px;
    margin: 10px auto;
    border: 0;
    background: var(--border-strong);
}

.external-link {
    padding: 1px 4px;
    border-bottom: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: 4px;
    color: var(--accent-text);
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.external-link:hover {
    background: var(--accent-soft);
    border-bottom-color: var(--accent);
    text-decoration: none;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* --- Область загрузки ---------------------------------------------------- */

.upload-section {
    margin-top: 28px;
}

.upload-area {
    padding: 52px 32px;
    border: 3px dashed color-mix(in srgb, var(--accent) 35%, transparent);
    border-left: 4px solid var(--accent);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

html[data-theme="light"] .upload-area {
    box-shadow: var(--shadow);
}

.upload-area:hover,
.upload-area:focus-visible {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 24px 50px rgba(255, 7, 58, 0.16);
}

.upload-area.is-dragover {
    border-color: var(--accent);
    background: var(--accent-softer);
    transform: scale(1.01);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-icon {
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 3.6rem;
    text-shadow: 0 0 12px rgba(255, 7, 58, 0.55);
    animation: icon-float 3s ease-in-out infinite;
}

@keyframes icon-float {
    50% {
        transform: translateY(-8px);
    }
}

.upload-area h2 {
    font-size: 1.45rem;
    font-weight: 600;
}

.upload-area p {
    color: var(--text-2);
}

.upload-limits {
    font-size: 0.92rem;
}

.upload-guest-note {
    color: var(--text-3);
}

.upload-quota {
    color: var(--info);
    font-size: 0.9rem;
}

.paste-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-text) !important;
    font-size: 0.9rem;
}

.upload-btn {
    margin-top: 10px;
    min-width: 210px;
}

/* --- Текущие загрузки ---------------------------------------------------- */

.upload-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.upload-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    animation: fade-up 0.25s ease-out;
}

.upload-row > i {
    font-size: 1.5rem;
    text-align: center;
}

.upload-row__info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.upload-row__name {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.93rem;
    font-weight: 500;
}

.upload-row__name span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-row__name span:last-child {
    flex: none;
    color: var(--text-3);
    font-size: 0.82rem;
    font-weight: 400;
}

.upload-row__status {
    color: var(--text-3);
    font-size: 0.83rem;
}

.upload-row__status.is-error {
    color: var(--danger);
}

.upload-row__status.is-done {
    color: var(--success);
}

/* --- История ------------------------------------------------------------- */

.history {
    margin-top: 32px;
}

.history__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.history__head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
}

.history__head h2 i {
    color: var(--accent-text);
}

.history__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.history-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 12px 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.15s ease, opacity 0.25s ease, transform 0.25s ease;
}

.history-item:hover {
    border-color: var(--border-strong);
}

.history-item.is-removing {
    opacity: 0;
    transform: translateX(-16px);
}

.history-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface-2);
    font-size: 1.3rem;
    overflow: hidden;
}

.history-item__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-item__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.history-item__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.history-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    color: var(--text-3);
    font-size: 0.82rem;
}

.history-item__meta .is-expiring {
    color: var(--warning);
}

.history-item__meta .is-expired {
    color: var(--danger);
}

.history-item__link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 0.8rem;
}

.history-item__actions {
    display: flex;
    gap: 2px;
}

.history__more {
    display: flex;
    margin: 10px auto 0;
}

/* --- Окна результата загрузки -------------------------------------------- */

.result-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--surface-2);
}

.result-file i {
    font-size: 1.6rem;
}

.result-file strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-file span {
    color: var(--text-3);
    font-size: 0.84rem;
}

.result-link {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.result-link .input {
    font-family: var(--mono);
    font-size: 0.86rem;
}

.result-preview {
    display: flex;
    justify-content: center;
    margin-top: 14px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--surface-2);
}

.result-preview img,
.result-preview video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.result-preview audio {
    width: 100%;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-list .result-file {
    padding: 10px 12px;
}

.result-list a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 0.8rem;
}

.time-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.time-options .choice {
    align-items: center;
}

.time-options .choice[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

.time-note {
    margin-top: 14px;
}

/* --- Подвал главной ------------------------------------------------------ */

.home-footer {
    text-align: center;
}

.home-footer__logo {
    padding-top: 22px;
}

.footer-logo {
    height: 3rem;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 7, 58, 0.35));
    opacity: 0.9;
}

.home-footer .site-footer__inner {
    justify-content: center;
    flex-direction: column;
}

/* --- Адаптив ------------------------------------------------------------- */

@media (max-width: 640px) {
    .hero {
        padding-top: 22px;
    }

    .brand-logo {
        height: 4.2rem;
    }

    .hero__about {
        padding: 14px 16px;
    }

    .upload-area {
        padding: 34px 18px;
    }

    .upload-area h2 {
        font-size: 1.2rem;
    }

    .paste-hint {
        display: none;
    }

    .history-item {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .history-item__icon {
        width: 40px;
        height: 40px;
    }

    .history-item__actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        margin-top: -4px;
    }
}
