:root {
    --bg-color: #f0f2f5;
    --card-bg: rgba(255, 255, 255, 0.8);
    --primary-color: #007bff;
    --accent-color: #6f42c1;
    --text-color: #1c1e21;
    --text-sub: #606770;
    --border-color: rgba(0, 0, 0, 0.08);
    --glow-color: rgba(0, 123, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.background-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 123, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.main-grid {
    display: flex;
    justify-content: center;
    width: 100%;
}

.container {
    width: 90%;
    max-width: 600px;
    text-align: center;
    padding: 3rem 0;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 3rem;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary-color);
}

.glass-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 4rem 3rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #1c1e21 0%, #444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-sub);
    font-size: 1.2rem;
    margin-bottom: 3.5rem;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.input-group {
    margin-bottom: 1.5rem;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 1.5rem;
    background: #fdfdfd;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-color);
    font-size: 1.2rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    resize: none;
}

.file-upload-section {
    margin: 2rem 0;
    text-align: center;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    color: var(--text-sub);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 123, 255, 0.02);
}

.file-status {
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2da44e;
    background: #e6f3e9;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
}

.file-status:empty {
    display: none;
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--glow-color);
}

.options-toggle {
    text-align: center;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: block;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.custom-options {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 12px;
}

.custom-options.show {
    display: flex;
}

.custom-options .prefix {
    color: var(--text-sub);
}

.custom-options input {
    border: none;
    background: transparent;
    padding: 0.5rem;
    margin: 0;
}

.custom-options input:focus {
    box-shadow: none;
}

button {
    width: 100%;
    padding: 1.5rem;
    background: var(--primary-color);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
}

button:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

button:active {
    transform: scale(0.98);
}

.result-area {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.result-area.visible {
    opacity: 1;
    transform: translateY(0);
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.links-list::-webkit-scrollbar {
    width: 5px;
}

.links-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.link-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.link-box span {
    color: var(--accent-color);
    font-family: monospace;
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-left: 1rem;
    background: rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none;
}

.error-message {
    color: #ff7b72;
    margin-top: 1rem;
}

.ad-sidebar {
    display: none !important;
}

footer {
    margin-top: 3rem;
    color: var(--text-sub);
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .glass-card {
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }
}

/* QR Code Styling */
.qr-container {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin: 10px auto;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.qr-container.show {
    display: flex;
}

.qr-greeting-text {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.qr-container canvas,
.qr-container img {
    max-width: 100%;
}

.qr-toggle,
.download-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    color: var(--text-sub);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    width: auto;
}

.qr-toggle:hover,
.download-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.download-btn {
    margin-top: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    padding: 2rem !important;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-sub);
    cursor: pointer;
    padding: 0;
    width: auto;
}

.modal-qr-body {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}