* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #FF6B81;
        --primary-light: #FF8A98;
        --text-color: #FFFFFF;
        --text-muted: #E0E0E0;
        --bg-color: #000000;
        --bg-light: #111111;
        --border-color: #222222;
        --card-bg: #0A0A0A;
    }
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    max-width: 100vw;
}

.modal.active {
    display: block;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 23, 26, 0.8);
    backdrop-filter: blur(5px);
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
    .modal-backdrop {
        background: rgba(0, 0, 0, 0.8);
    }
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 15px 15px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    max-width: 100vw;
}

@media (prefers-color-scheme: dark) {
    .modal-content {
        background: #000000;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(114, 47, 55, 0.1);
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
    max-width: 100%;
}

@media (prefers-color-scheme: dark) {
    .modal-header {
        background: #000000;
        border-bottom: 1px solid rgba(255, 107, 129, 0.1);
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fullscreen-upload-btn {
    background: #fbeced;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #722F37;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
    .fullscreen-upload-btn {
        background: #111111;
        color: #FF6B81;
    }
}

.fullscreen-upload-btn:hover {
    background: #722F37;
    color: white;
}

@media (prefers-color-scheme: dark) {
    .fullscreen-upload-btn:hover {
        background: #FF6B81;
    }
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #34171A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

@media (prefers-color-scheme: dark) {
    .modal-title {
        color: #FFFFFF;
    }
}

.modal-close {
    background: #fbeced;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #722F37;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
    .modal-close {
        background: #111111;
        color: #FF6B81;
    }
}

.modal-close:hover {
    background: #722F37;
    color: white;
}

@media (prefers-color-scheme: dark) {
    .modal-close:hover {
        background: #FF6B81;
    }
}

.form-group {
    margin-bottom: 15px;
    padding: 0 20px;
    max-width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #34171A;
    font-size: 14px;
}

@media (prefers-color-scheme: dark) {
    .form-group label {
        color: #FFFFFF;
    }
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(114, 47, 55, 0.1);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #ffffff;
    max-width: 100%;
}

@media (prefers-color-scheme: dark) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #111111;
        border: 2px solid rgba(255, 107, 129, 0.1);
        color: #FFFFFF;
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #722F37;
    box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.1);
}

@media (prefers-color-scheme: dark) {
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #FF6B81;
        box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.1);
    }
}

.form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.link-with-size {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 100%;
}

.size-input {
    width: 100px;
    flex-shrink: 0;
}

#app-link {
    flex: 1;
    min-width: 0;
}

.special-features-info {
    color: #722F37;
    cursor: pointer;
    margin-left: 4px;
    transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .special-features-info {
        color: #FF6B81;
    }
}

.special-features-info:hover {
    color: #8C3D45;
    transform: scale(1.1);
}

@media (prefers-color-scheme: dark) {
    .special-features-info:hover {
        color: #FF8A98;
    }
}

.fullscreen-feature-btn {
    color: #722F37;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

@media (prefers-color-scheme: dark) {
    .fullscreen-feature-btn {
        color: #FF6B81;
    }
}

.fullscreen-feature-btn:hover {
    color: #8C3D45;
    transform: scale(1.1);
}

@media (prefers-color-scheme: dark) {
    .fullscreen-feature-btn:hover {
        color: #FF8A98;
    }
}

.special-features-instructions {
    background: #fbeced;
    padding: 15px;
    border-radius: 10px;
    margin-top: 8px;
    font-size: 12px;
    color: #8C3D45;
    border-left: 4px solid #722F37;
}

@media (prefers-color-scheme: dark) {
    .special-features-instructions {
        background: #111111;
        color: #FF8A98;
        border-left: 4px solid #FF6B81;
    }
}

.special-features-instructions p {
    margin-bottom: 8px;
}

.special-features-instructions strong {
    color: #34171A;
}

@media (prefers-color-scheme: dark) {
    .special-features-instructions strong {
        color: #FFFFFF;
    }
}

.special-features-instructions ul {
    margin-left: 15px;
    margin-bottom: 10px;
}

.special-features-instructions li {
    margin-bottom: 4px;
}

.special-features-instructions code {
    background: rgba(114, 47, 55, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #722F37;
}

@media (prefers-color-scheme: dark) {
    .special-features-instructions code {
        background: rgba(255, 107, 129, 0.1);
        color: #FF6B81;
    }
}

.fullscreen-editor-open {
    overflow: hidden;
}

.fullscreen-upload-open {
    overflow: hidden;
}

.fullscreen-upload-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .fullscreen-upload-container {
        background: #000000;
    }
}

.fullscreen-upload {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    height: 100%;
}

.upload-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(114, 47, 55, 0.1);
    background: #ffffff;
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .upload-header {
        background: #000000;
        border-bottom: 1px solid rgba(255, 107, 129, 0.1);
    }
}

.upload-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #34171A;
}

@media (prefers-color-scheme: dark) {
    .upload-header h3 {
        color: #FFFFFF;
    }
}

.upload-controls {
    display: flex;
    gap: 10px;
}

.upload-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fullscreen-upload-textarea {
    width: 100%;
    flex: 1;
    padding: 20px;
    border: 2px solid rgba(114, 47, 55, 0.1);
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    resize: none;
    background: #fafafa;
    transition: all 0.3s ease;
    line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
    .fullscreen-upload-textarea {
        background: #111111;
        border: 2px solid rgba(255, 107, 129, 0.1);
        color: #FFFFFF;
    }
}

.fullscreen-upload-textarea:focus {
    outline: none;
    border-color: #722F37;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.1);
}

@media (prefers-color-scheme: dark) {
    .fullscreen-upload-textarea:focus {
        border-color: #FF6B81;
        background: #000000;
        box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.1);
    }
}

.upload-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(114, 47, 55, 0.1);
    background: #fbeced;
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .upload-footer {
        background: #111111;
        border-top: 1px solid rgba(255, 107, 129, 0.1);
    }
}

.full-width-instructions-btn {
    width: 100%;
    padding: 12px 20px;
    background: #722F37;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

@media (prefers-color-scheme: dark) {
    .full-width-instructions-btn {
        background: #FF6B81;
    }
}

.full-width-instructions-btn:hover {
    background: #8C3D45;
    transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
    .full-width-instructions-btn:hover {
        background: #FF8A98;
    }
}

@keyframes slideIn {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.fullscreen-editor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .fullscreen-editor-container {
        background: #000000;
    }
}

.fullscreen-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    height: 100%;
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(114, 47, 55, 0.1);
    background: #ffffff;
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .editor-header {
        background: #000000;
        border-bottom: 1px solid rgba(255, 107, 129, 0.1);
    }
}

.editor-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #34171A;
}

@media (prefers-color-scheme: dark) {
    .editor-header h3 {
        color: #FFFFFF;
    }
}

.editor-controls {
    display: flex;
    gap: 10px;
}

.editor-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fullscreen-textarea {
    width: 100%;
    flex: 1;
    padding: 20px;
    border: 2px solid rgba(114, 47, 55, 0.1);
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    resize: none;
    background: #fafafa;
    transition: all 0.3s ease;
    line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
    .fullscreen-textarea {
        background: #111111;
        border: 2px solid rgba(255, 107, 129, 0.1);
        color: #FFFFFF;
    }
}

.fullscreen-textarea:focus {
    outline: none;
    border-color: #722F37;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.1);
}

@media (prefers-color-scheme: dark) {
    .fullscreen-textarea:focus {
        border-color: #FF6B81;
        background: #000000;
        box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.1);
    }
}

.editor-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(114, 47, 55, 0.1);
    background: #fbeced;
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .editor-footer {
        background: #111111;
        border-top: 1px solid rgba(255, 107, 129, 0.1);
    }
}

.html-tools {
    max-width: 100%;
}

.html-tools strong {
    display: block;
    margin-bottom: 10px;
    color: #34171A;
    font-size: 14px;
}

@media (prefers-color-scheme: dark) {
    .html-tools strong {
        color: #FFFFFF;
    }
}

.html-buttons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: #722F37 transparent;
    -webkit-overflow-scrolling: touch;
}

@media (prefers-color-scheme: dark) {
    .html-buttons {
        scrollbar-color: #FF6B81 transparent;
    }
}

.html-buttons::-webkit-scrollbar {
    height: 4px;
}

.html-buttons::-webkit-scrollbar-track {
    background: transparent;
}

.html-buttons::-webkit-scrollbar-thumb {
    background: #722F37;
    border-radius: 2px;
}

@media (prefers-color-scheme: dark) {
    .html-buttons::-webkit-scrollbar-thumb {
        background: #FF6B81;
    }
}

.html-buttons::-webkit-scrollbar-thumb:hover {
    background: #8C3D45;
}

@media (prefers-color-scheme: dark) {
    .html-buttons::-webkit-scrollbar-thumb:hover {
        background: #FF8A98;
    }
}

.html-buttons button {
    background: #ffffff;
    border: 2px solid rgba(114, 47, 55, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    color: #722F37;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .html-buttons button {
        background: #111111;
        border: 2px solid rgba(255, 107, 129, 0.2);
        color: #FF6B81;
    }
}

.html-buttons button:hover {
    background: #722F37;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.2);
}

@media (prefers-color-scheme: dark) {
    .html-buttons button:hover {
        background: #FF6B81;
        box-shadow: 0 4px 12px rgba(255, 107, 129, 0.2);
    }
}

.html-buttons button:active {
    transform: translateY(0);
}

.preview-modal {
    z-index: 5000;
}

.preview-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    margin: 20px auto;
    border-radius: 15px;
    animation: scaleIn 0.3s ease;
}

.instructions-modal {
    z-index: 5000;
}

.instructions-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    margin: 20px auto;
    border-radius: 15px;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.preview-content-modal {
    padding: 20px;
    font-size: 14px;
    line-height: 1.5;
    max-height: 50vh;
    overflow-y: auto;
}

.preview-content-modal ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.preview-content-modal li {
    margin-bottom: 5px;
}

.preview-modal .form-actions {
    padding: 15px 20px;
    border-top: 1px solid rgba(114, 47, 55, 0.1);
    background: rgba(114, 47, 55, 0.05);
}

@media (prefers-color-scheme: dark) {
    .preview-modal .form-actions {
        border-top: 1px solid rgba(255, 107, 129, 0.1);
        background: rgba(255, 107, 129, 0.05);
    }
}

.instructions-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.5;
    max-height: 50vh;
    overflow-y: auto;
}

.instructions-example {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #722F37;
}

@media (prefers-color-scheme: dark) {
    .instructions-example {
        background: #111111;
        border-left: 4px solid #FF6B81;
    }
}

.instructions-example pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.instructions-fields, .instructions-notes {
    margin: 15px 0;
}

.instructions-fields ul, .instructions-notes ul {
    margin-left: 20px;
    margin-top: 8px;
}

.instructions-fields li, .instructions-notes li {
    margin-bottom: 6px;
    line-height: 1.4;
}

.instructions-fields code {
    background: rgba(114, 47, 55, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #722F37;
    font-weight: 600;
}

@media (prefers-color-scheme: dark) {
    .instructions-fields code {
        background: rgba(255, 107, 129, 0.1);
        color: #FF6B81;
    }
}

.form-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: rgba(114, 47, 55, 0.05);
    margin-top: 15px;
    bottom: 0;
    max-width: 100%;
}

@media (prefers-color-scheme: dark) {
    .form-actions {
        background: rgba(255, 107, 129, 0.05);
    }
}

.add-mirror-btn {
    background: linear-gradient(135deg, #722F37, #8C3D45);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    width: 100%;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(114, 47, 55, 0.1);
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
    .add-mirror-btn {
        background: linear-gradient(135deg, #FF6B81, #FF8A98);
        box-shadow: 0 4px 15px rgba(255, 107, 129, 0.1);
    }
}

.add-mirror-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 47, 55, 0.2);
    background: linear-gradient(135deg, #8C3D45, #A8565F);
}

@media (prefers-color-scheme: dark) {
    .add-mirror-btn:hover {
        box-shadow: 0 6px 20px rgba(255, 107, 129, 0.2);
        background: linear-gradient(135deg, #FF8A98, #FFA3AF);
    }
}

.add-mirror-btn:active {
    transform: translateY(0);
}

.remove-mirror-btn {
    background: #fbeced;
    color: #722F37;
    border: 2px solid rgba(114, 47, 55, 0.2);
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    flex-shrink: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
    .remove-mirror-btn {
        background: #111111;
        color: #FF6B81;
        border: 2px solid rgba(255, 107, 129, 0.2);
    }
}

.remove-mirror-btn:hover {
    background: rgba(114, 47, 55, 0.1);
    border-color: #722F37;
}

@media (prefers-color-scheme: dark) {
    .remove-mirror-btn:hover {
        background: rgba(255, 107, 129, 0.1);
        border-color: #FF6B81;
    }
}

.mirror-link-group {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 100%;
    margin-bottom: 8px;
}

.mirror-link-group input {
    flex: 1;
    min-width: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #722F37, #8C3D45);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(114, 47, 55, 0.1);
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
    .btn-primary {
        background: linear-gradient(135deg, #FF6B81, #FF8A98);
        box-shadow: 0 4px 15px rgba(255, 107, 129, 0.1);
    }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 47, 55, 0.2);
}

@media (prefers-color-scheme: dark) {
    .btn-primary:hover {
        box-shadow: 0 6px 20px rgba(255, 107, 129, 0.2);
    }
}

.btn-secondary {
    background: #fbeced;
    color: #34171A;
    border: 2px solid rgba(114, 47, 55, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
    .btn-secondary {
        background: #111111;
        color: #FFFFFF;
        border: 2px solid rgba(255, 107, 129, 0.2);
    }
}

.btn-secondary:hover {
    background: rgba(114, 47, 55, 0.1);
    border-color: #722F37;
}

@media (prefers-color-scheme: dark) {
    .btn-secondary:hover {
        background: rgba(255, 107, 129, 0.1);
        border-color: #FF6B81;
    }
}

.category-list {
    padding: 15px;
    max-width: 100%;
}

.category-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 6px;
    border: 2px solid transparent;
    max-width: 100%;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

.category-option:hover {
    background: #fbeced;
}

@media (prefers-color-scheme: dark) {
    .category-option:hover {
        background: #111111;
    }
}

.category-option.active {
    background: linear-gradient(135deg, #722F37, #8C3D45);
    color: white;
    border-color: #722F37;
}

@media (prefers-color-scheme: dark) {
    .category-option.active {
        background: linear-gradient(135deg, #FF6B81, #FF8A98);
        border-color: #FF6B81;
    }
}

.category-option.active i {
    color: white;
}

.category-option i {
    color: #722F37;
    font-size: 16px;
    width: 18px;
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .category-option i {
        color: #FF6B81;
    }
}

.category-option span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: #ffffff;
    z-index: 1500;
    transition: all 0.3s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    max-width: 100vw;
    overflow: hidden;
}

@media (prefers-color-scheme: dark) {
    .sidebar {
        background: #000000;
    }
}

.sidebar.active {
    right: 0;
}

.sidebar-content {
    padding: 20px;
    height: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fbeced;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #722F37;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    z-index: 10;
}

@media (prefers-color-scheme: dark) {
    .sidebar-close {
        background: #111111;
        color: #FF6B81;
    }
}

.sidebar-close:hover {
    background: #722F37;
    color: white;
}

@media (prefers-color-scheme: dark) {
    .sidebar-close:hover {
        background: #FF6B81;
    }
}

.sidebar-header {
    padding: 15px 0;
    border-bottom: 1px solid rgba(114, 47, 55, 0.1);
    margin-bottom: 15px;
}

@media (prefers-color-scheme: dark) {
    .sidebar-header {
        border-bottom: 1px solid rgba(255, 107, 129, 0.1);
    }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #722F37, #8C3D45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

@media (prefers-color-scheme: dark) {
    .sidebar .user-avatar {
        background: linear-gradient(135deg, #FF6B81, #FF8A98);
    }
}

.sidebar .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.sidebar .user-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #722F37, #8C3D45);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

@media (prefers-color-scheme: dark) {
    .sidebar .user-avatar .avatar-fallback {
        background: linear-gradient(135deg, #FF6B81, #FF8A98);
    }
}

.sidebar .user-avatar.guest {
    background: #95a5a6;
}

.sidebar .user-avatar.guest i {
    font-size: 20px;
}

.user-details h3 {
    font-size: 14px;
    font-weight: 600;
    color: #34171A;
    margin-bottom: 2px;
}

@media (prefers-color-scheme: dark) {
    .user-details h3 {
        color: #FFFFFF;
    }
}

.user-status {
    font-size: 11px;
    color: #8C3D45;
}

@media (prefers-color-scheme: dark) {
    .user-status {
        color: #FF8A98;
    }
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34171A;
    max-width: 100%;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
    .sidebar-item {
        color: #FFFFFF;
    }
}

.sidebar-item:hover {
    background: #fbeced;
    transform: translateX(5px);
}

@media (prefers-color-scheme: dark) {
    .sidebar-item:hover {
        background: #111111;
    }
}

.sidebar-item i {
    color: #722F37;
    font-size: 16px;
    width: 18px;
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .sidebar-item i {
        color: #FF6B81;
    }
}

.sidebar-footer {
    margin-top: auto;
    padding: 15px 0 10px 0;
    text-align: center;
    border-top: 1px solid rgba(114, 47, 55, 0.1);
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .sidebar-footer {
        border-top: 1px solid rgba(255, 107, 129, 0.1);
    }
}

.sidebar-footer p {
    color: #8C3D45;
    font-size: 12px;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

@media (prefers-color-scheme: dark) {
    .sidebar-footer p {
        color: #FF8A98;
    }
}

.sidebar-telegram {
    cursor: pointer;
    padding: 8px 12px;
    background: rgba(114, 47, 55, 0.1);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: #34171A;
    font-size: 12px;
    width: auto;
    min-width: 160px;
    margin: 0 auto;
}

@media (prefers-color-scheme: dark) {
    .sidebar-telegram {
        background: rgba(255, 107, 129, 0.1);
        color: #FFFFFF;
    }
}

.sidebar-telegram:hover {
    background: rgba(114, 47, 55, 0.2);
    transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
    .sidebar-telegram:hover {
        background: rgba(255, 107, 129, 0.2);
    }
}

.sidebar-telegram i {
    color: #0088cc;
    font-size: 14px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(114, 47, 55, 0.1);
    z-index: 1000;
    max-width: 100%;
}

@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(0, 0, 0, 0.95);
        border-top: 1px solid rgba(255, 107, 129, 0.1);
    }
}

.nav-container {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    max-width: 100%;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    flex: 1;
    max-width: 70px;
    min-width: 0;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

.nav-item.active {
    background: #fbeced;
}

@media (prefers-color-scheme: dark) {
    .nav-item.active {
        background: #111111;
    }
}

.nav-item.active .nav-icon {
    background: linear-gradient(135deg, #722F37, #8C3D45);
    color: white;
}

@media (prefers-color-scheme: dark) {
    .nav-item.active .nav-icon {
        background: linear-gradient(135deg, #FF6B81, #FF8A98);
    }
}

.nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fbeced;
    color: #722F37;
    transition: all 0.3s ease;
    font-size: 16px;
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .nav-icon {
        background: #111111;
        color: #FF6B81;
    }
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
    color: #34171A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

@media (prefers-color-scheme: dark) {
    .nav-label {
        color: #FFFFFF;
    }
}

body.sidebar-open {
    overflow: hidden;
    max-width: 100vw;
}

body.modal-open {
    overflow: hidden;
    max-width: 100vw;
}

@media (min-width: 768px) {
    .bottom-nav {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 800px;
        background: linear-gradient(135deg, #722F37, #8C3D45);
        border-radius: 30px;
        box-shadow: 0 5px 30px rgba(114, 47, 55, 0.3);
        border: none;
        backdrop-filter: none;
        padding: 4px 20px;
        height: auto;
    }

    @media (prefers-color-scheme: dark) {
        .bottom-nav {
            background: linear-gradient(135deg, #FF6B81, #C44569);
            box-shadow: 0 5px 30px rgba(255, 107, 129, 0.3);
        }
    }
    
    .nav-container {
        padding: 4px 0;
        justify-content: space-between;
    }
    
    .nav-item {
        flex: none;
        max-width: none;
        padding: 6px 14px;
        border-radius: 20px;
        background: transparent;
    }
    
    .nav-item.active {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .nav-item.active .nav-icon {
        background: #ffffff;
        color: #722F37;
    }

    @media (prefers-color-scheme: dark) {
        .nav-item.active .nav-icon {
            background: #ffffff;
            color: #C44569;
        }
    }
    
    .nav-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }
    
    .nav-label {
        font-size: 11px;
        font-weight: 500;
        color: #ffffff;
    }
    
    .nav-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }
    
    .nav-item:hover .nav-icon {
        transform: scale(1.1);
        background: rgba(255, 255, 255, 0.2);
    }
    
    .link-with-size {
        gap: 15px;
    }
    
    .size-input {
        width: 100px;
        flex-shrink: 0;
    }
    
    #app-link {
        flex: 3;
        min-width: 0;
    }
    
    #file-size {
        width: 100px;
        flex-shrink: 0;
    }
    
    .add-mirror-btn {
        width: auto;
        margin-top: 0;
    }
    
    .mirror-link-group {
        gap: 15px;
    }
    
    .mirror-link-group input {
        flex: 3;
        min-width: 0;
    }
    
    .mirror-link-group .remove-mirror-btn {
        flex-shrink: 0;
        width: 44px;
    }
}

@media (max-width: 768px) {
    .editor-header {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .editor-controls {
        width: 100%;
    }
    
    .editor-content {
        padding: 15px;
    }
    
    .editor-footer {
        padding: 12px 15px;
    }
    
    .upload-header {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .upload-controls {
        width: 100%;
    }
    
    .upload-content {
        padding: 15px;
    }
    
    .upload-footer {
        padding: 12px 15px;
    }
    
    .html-buttons {
        gap: 6px;
    }
    
    .html-buttons button {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .preview-modal .modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .instructions-modal .modal-content {
        margin: 10px;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 260px;
    }
    
    .link-with-size {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .size-input {
        width: 70px;
        max-width: 25%;
    }
    
    #app-link {
        min-width: calc(100% - 80px);
    }
    
    .nav-container {
        padding: 6px 0;
    }
    
    .nav-item {
        padding: 4px 8px;
        max-width: 60px;
    }
    
    .nav-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .nav-label {
        font-size: 9px;
    }
    
    .html-buttons button {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .preview-content-modal {
        padding: 15px;
    }
    
    .instructions-content {
        padding: 15px;
    }
}

@media (max-width: 320px) {
    .nav-label {
        font-size: 8px;
    }
    
    .nav-item {
        padding: 3px 6px;
        max-width: 55px;
    }
    
    .nav-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .html-buttons button {
        padding: 4px 6px;
        font-size: 9px;
    }
}