* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Link Input */
#link-input-container {
    width: 90%;
    max-width: 500px;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#link-input-container h3 {
    color: #00ffff;
    margin-bottom: 20px;
    font-size: 18px;
}

#link-input-container input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #533483;
    border-radius: 8px;
    background: #1a1a2e;
    color: #eee;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
}

#link-input-container input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.3);
}

#link-input-container button {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

#link-input-container button:hover {
    background: linear-gradient(135deg, #6d28d9, #1d4ed8);
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
}

/* Edit Link Button */
#edit-link-btn {
    position: fixed;
    top: 60px;
    right: 16px;
    padding: 8px 14px;
    background: #533483;
    color: #eee;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 999;
    font-size: 13px;
    transition: all 0.2s;
}

#edit-link-btn:hover {
    background: #7c3aed;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

/* Main Container */
#main-container {
    width: 95%;
    max-width: 600px;
    animation: fadeIn 0.3s ease;
}

/* Embed Card */
#embed-card {
    background: #16213e;
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(124, 58, 237, 0.12), 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 24px;
}

#embed-card h3 {
    margin: 0 0 16px 0;
    color: #00ffff;
    font-size: 18px;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}

/* Input Mode Toggle */
.input-mode-toggle {
    display: flex;
    margin-bottom: 14px;
    border: 1px solid #533483;
    border-radius: 8px;
    overflow: hidden;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    background: #1a1a2e;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    color: #888;
    transition: all 0.2s;
}

.mode-btn:hover {
    color: #ccc;
    background: rgba(124, 58, 237, 0.1);
}

.mode-btn.active {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: white;
}

/* Embed Input Sections */
.embed-input-section {
    margin-bottom: 14px;
}

.embed-input-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #888;
    font-size: 13px;
}

.embed-input-section input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #533483;
    border-radius: 8px;
    background: #1a1a2e;
    color: #eee;
    font-size: 13px;
    box-sizing: border-box;
}

.embed-input-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #533483;
    border-radius: 8px;
    background: #1a1a2e;
    color: #eee;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.embed-input-section textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.25);
}

/* Filename Field */
.filename-field {
    margin-bottom: 14px;
}

.filename-field label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.filename-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #533483;
    border-radius: 8px;
    background: #1a1a2e;
    color: #eee;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.filename-field input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.25);
}

.filename-field input::placeholder {
    color: #555;
}

/* Option Row */
.option-row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.option-row label {
    font-size: 13px;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Chunk Options */
#chunk-options {
    margin-bottom: 14px;
}

.chunk-inputs {
    display: flex;
    gap: 12px;
}

.chunk-field {
    flex: 1;
}

.chunk-field label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.chunk-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #533483;
    border-radius: 8px;
    background: #1a1a2e;
    color: #eee;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.chunk-field input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.25);
}

/* Embed Button */
#embed-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.3);
}

#embed-btn:hover {
    background: linear-gradient(135deg, #6d28d9, #1d4ed8);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
}

#embed-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Embed Status */
#embed-status {
    margin-top: 12px;
    padding: 8px;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    #main-container {
        width: 100%;
    }

    #embed-card {
        border-radius: 10px;
        padding: 16px;
    }

    #embed-card h3 {
        font-size: 16px;
    }

    #edit-link-btn {
        top: 52px;
        right: 8px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .option-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .chunk-inputs {
        flex-direction: column;
    }
}
