* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    zoom: 90%;
    font-family: 'Open Sans', sans-serif;
    background-color: #151515;
    color: #d1d5db;
    min-height: 100vh;
}

.app-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.main-container {
    width: 100%;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.app-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.main-title {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .main-title {
        font-size: 3.75rem;
    }
}

.wave-gradient-text {
    font-weight: 700;
    background: linear-gradient(90deg, #E555A6 0%, #e80860 50%, #E555A6 100%);
    background-size: 200% auto;
    animation: gradientWave 5s linear infinite;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.125rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

#tooltipTrigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9999px;
    border: 1px solid #71717a;
    color: #71717a;
    background-color: transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

#tooltipTrigger:hover {
    border-color: #e80860;
    color: #e80860;
}

#filetypes-popup {
    position: absolute;
    left: 50%;
    top: 100%;
    margin-top: 0.5rem;
    transform: translateX(-50%);
    width: 12rem;
    background-color: #18181b;
    border: 1px solid #27272a;
    color: #a1a1aa;
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 50;
    font-size: 0.75rem;
    text-transform: none;
    letter-spacing: normal;
    text-align: center;
}

.accent-text {
    color: #e80860;
    font-weight: 700;
}

.upload-section {
    margin-bottom: 2rem;
}

.drop-zone {
    background-color: #18181b;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    cursor: pointer;
    border: 2px dashed #3f3f46;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.drop-zone:hover {
    border-color: #e80860;
    background-color: rgba(232, 8, 96, 0.05);
}

.drop-zone.active {
    border-color: #E555A6;
    background-color: rgba(232, 8, 96, 0.1);
    box-shadow: 0 0 25px rgba(232, 8, 96, 0.15);
}

.status-wrapper {
    position: relative;
    z-index: 20;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#statusText {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

#timeEst {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e80860;
}

#progressContainer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: #27272a;
    z-index: 10;
}

#progressBar {
    height: 100%;
    background: linear-gradient(90deg, #E555A6 0%, #e80860 100%);
    width: 0;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px #e80860;
}

#errorMsg {
    color: #ef4444;
    font-weight: 500;
    text-align: center;
    margin-top: 1rem;
    background-color: rgba(69, 10, 10, 0.3);
    border: 1px solid rgba(127, 29, 29, 0.5);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

#result-area {
    background-color: #18181b;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #27272a;
    animation: fadeIn 0.4s ease forwards;
}

.link-bar-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .link-bar-row {
        flex-direction: row;
    }
}

#outURL {
    flex-grow: 1;
    background-color: #09090b;
    border: 1px solid #3f3f46;
    color: #f4f4f5;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0.5rem;
    outline: none;
    font-family: monospace;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

#outURL:focus {
    border-color: #e80860;
}

.button-group {
    display: flex;
    gap: 0.5rem;
}

#copyBtn, #rawBtn {
    font-weight: 700;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

#copyBtn {
    flex: 1;
    background-color: #27272a;
    border: 1px solid #a20140;
    color: #ffffff;
}

@media (min-width: 640px) {
    #copyBtn {
        flex: none;
    }
}

#copyBtn:hover {
    background-color: #a20140;
}

#copyBtn:active, #rawBtn:active {
    transform: scale(0.95);
}

#rawBtn {
    flex: 1;
    background-color: transparent;
    border: 1px solid #52525b;
    color: #d1d5db;
}

@media (min-width: 640px) {
    #rawBtn {
        flex: none;
    }
}

#rawBtn:hover {
    background-color: #27272a;
    border-color: #e80860;
    color: #e80860;
}

#previewContainer {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #27272a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

#previewImg, #previewVideo {
    max-width: 100%;
    max-height: 400px;
    border: 1px solid #3f3f46;
    border-radius: 0.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

#previewVideo {
    outline: none;
    background-color: #000000;
}

#previewRaw {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #e80860;
    border: 2px dashed #3f3f46;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.25rem;
    text-transform: uppercase;
}

#history-section {
    background-color: #18181b;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #27272a;
}

.history-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #71717a;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid #27272a;
    padding-bottom: 0.75rem;
}

#historyList {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#historyList li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

#historyList li:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

#historyList li span {
    color: #52525b;
    margin-right: 0.75rem;
    font-size: 0.75rem;
    font-family: monospace;
    font-weight: 700;
    width: 2.5rem;
}

#historyList li a {
    color: #d1d5db;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
    text-decoration: none;
    font-size: 0.875rem;
    font-family: monospace;
}

#historyList li:hover a {
    color: #e80860;
}

.divider {
    border: 0;
    border-top: 1px solid #27272a;
    margin-top: 2rem;
    margin-bottom: 2rem;
    width: 75%;
    margin-left: auto;
    margin-right: auto;
}

.app-footer {
    text-align: center;
    position: relative;
    z-index: 10;
    padding-bottom: 2rem;
}

.footer-blur-backdrop {
    background-color: rgba(21, 21, 21, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: inline-flex;
    gap: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.footer-link {
    color: #e80860;
    transition: color 0.3s;
    font-weight: 500;
    text-decoration: none;
}

.footer-link:hover {
    color: #E555A6;
}

.footer-separator {
    color: #27272a;
}

#dragOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#dragOverlay.active {
    display: flex;
}

.overlay-text {
    font-size: 2rem;
    border: 4px dashed #e80860;
    padding: 40px;
    background: #151515;
    color: #e80860;
    font-weight: bold;
    border-radius: 12px;
    text-transform: uppercase;
}

.hidden {
    display: none !important;
}

@keyframes gradientWave {
    0% { background-position: 200% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}