.main-container {
    border: 1px solid #e5e7eb;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    margin: 32px 0;
    overflow: hidden;
}

.header-container {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.device-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
}

.device {
    padding: 8px;
    cursor: pointer;
}

.device img,
.lightDarkButton img,
.copy-button img {
    width: 20px;
    height: 20px;
}

.device:hover, .lightDarkButton:hover, .copy-button:hover {
    background: #eef2ff;
    border-radius: 6px;
}

.device.active img {
    filter: brightness(0) saturate(100%) invert(21%) sepia(49%) saturate(5280%) hue-rotate(241deg) brightness(95%) contrast(89%);
}

.custom-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-button {
    max-width: 200px;
    padding: 5px 8px;
    border: none;
    cursor: pointer;
    background-color: #fff;
    display: flex;
    align-items: center;
}

.theme-icon img,
.down-icon img {
    height: 16px;
    width: 16px;
    vertical-align: middle;
    color: #6b7280;
}

.dropdown-text {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    padding: 6px 8px 6px 7px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    z-index: 1;
    width: 100%;
    min-width: 125px;
    box-shadow: 0px 4px 6px 2px rgba(0, 0, 0, 0.05), 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.dropdown-item {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    padding: 6px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.dropdown-item .select-icon {
    width: 14px;
    height: 14px;
    margin: 0 12px 0 6px;
    display: flex;
    align-items: center;
}

.dropdown-item .select-icon img {
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
}

.lightDarkButton {
    cursor: pointer;
    width: 20px;
    height: 20px;
    padding: 8px;
    margin: 0 16px 0 0;
    display: flex;
    align-items: center;
}

.iframe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: repeating-linear-gradient(to bottom, #e5e7eb, #e5e7eb 1px, transparent 1px, transparent 20px), repeating-linear-gradient(to right, #e5e7eb, #e5e7eb 1px, transparent 1px, transparent 20px);
}

.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-container {
    min-width: 100%;
    min-height: 36rem;
    border: none;
    overflow: hidden;
}

.preview-code-container {
    margin: 0;
    position: relative;
}

.preview-code-container pre {
    margin: 0;
    padding: 12px 24px;
}

.preview-code-container code {
    display: block;
    padding: 0;
    overflow: inherit;
    background-color: #ffffff;
}

.copy-button {
    width: 20px;
    height: 20px;
    margin: 6px 14px 6px 0;
    padding: 8px;
    color: #6b7280;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.tabs {
    display: flex;
    align-items: flex-start;
    padding: 0;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

.tab-buttons {
    display: flex;
    margin: 0 auto;
}

.tab {
    flex: 0 0 auto;
    padding: 5px 0;
    margin: 10px 0;
    cursor: pointer;
    text-align: center;
    color: #374151;
    transition: background-color 0.3s;
    border-color: #d1d5db;
    width: 85px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}

.html-tab {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    border-width: 1px 0 1px 1px;
    border-style: solid;
}

.css-tab {
    border-width: 1px;
    border-style: solid;
    display: none;
}

.typescript-tab {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border-width: 1px 1px 1px 0;
    border-style: solid;
}

.tab.active {
    color: #ffffff;
    background-color: #4f46e5;
    border: none;
}

.tab-content {
    display: none;
    flex: 1;
    position: relative;
    overflow-x: auto;
    background-color: #ffffff;
}

.tab-content.active {
    display: block;
}

.main-tab {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0 0 0 18px;
    background: #f9fafb;
}

.tab-item {
    padding: 12px 8px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-align: left;
    color: #6b7280;
    display: flex;
    align-items: center;
}

.tab-item img {
    margin-left: 10px;
}

.tab-text {
    margin: 0 10px 0 12px;
}

.tab-item.active {
    color: #4f46e5;
    font-weight: 500;
}

.tab-item.active img {
    filter: brightness(0) saturate(100%) invert(21%) sepia(49%) saturate(5280%) hue-rotate(241deg) brightness(95%) contrast(89%);
}

.tab-item::after {
    content: "";
    height: 2px;
    background: #4f46e5;
    position: absolute;
    left: 0;
    bottom: 0;
}

.tab-item.active::after {
    width: 100%;
}

.tooltip {
    position: absolute;
    background: #101828;
    color: #f9fafb;
    border-radius: 8px;
    display: none;
    z-index: 20;
    width: 100px;
    height: 34px;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.tooltip-arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    left: calc(50% - 12px / 2 + 6px);
    bottom: 25px;
    background: #101828;
    border-radius: 1px;
    transform: rotate(-135deg);
}

.tooltip.show {
    display: flex;
}

@media (max-width: 768px) {
    .device-buttons .desktop,
    .tab-text {
        display: none;
    }

    .tab-item img {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .lightDarkButton {
        margin: 0 6px 0 0;
    }

    .device-buttons,
    .copy-button,
    .dropdown-text {
        display: none;
    }

    .custom-dropdown {
        margin: 0 0 0 auto;
    }
}