.html-viewer-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    margin: 0;
}

.html-viewer-container .header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    overflow: hidden;
}

.html-viewer-container .header h1 {
    font-size: clamp(22px, 3vw, 28px);
    margin-bottom: 10px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.html-viewer-container .header p {
    font-size: clamp(13px, 1.6vw, 14px);
    opacity: 0.9;
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.html-viewer-container .toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
    justify-content: space-between;
}

.html-viewer-container .btn-group {
    display: flex;
    gap: 5px;
}

.html-viewer-container .toolbar-links {
    margin-left: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.html-viewer-container button,
.html-viewer-container .btn-primary,
.html-viewer-container .copy-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.html-viewer-container .btn-primary {
    background: #667eea;
    color: white;
}

.html-viewer-container .btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.html-viewer-container .btn-primary.active {
    background: #764ba2;
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.3);
}

.html-viewer-container .btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.html-viewer-container .btn-secondary:hover {
    background: #d0d0d0;
}

.html-viewer-container .btn-danger {
    background: #ff6b6b;
    color: white;
}

.html-viewer-container .btn-danger:hover {
    background: #ff5252;
}

.html-viewer-container .btn-success {
    background: #51cf66;
    color: white;
}

.html-viewer-container .btn-success:hover {
    background: #37b24d;
}

.html-viewer-container .content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    min-height: calc(100vh - 160px);
}

.html-viewer-container .panel {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.html-viewer-container .panel-header {
    background: #f0f0f0;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.html-viewer-container .panel-content {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.html-viewer-container #htmlInput {
    flex: 1;
    padding: 20px;
    border: none;
    background: white;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: none;
    color: #333;
    line-height: 1.6;
}

.html-viewer-container #htmlInput:focus {
    outline: none;
    background: #fafafa;
}

.html-viewer-container #previewFrame {
    flex: 1;
    border: none;
    background: white;
    width: 100%;
    height: 100%;
}

.html-viewer-container .hidden {
    display: none !important;
}

.html-viewer-container .raw-code-container {
    flex: 1;
    padding: 20px;
    border: none;
    background: white;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 1024px) {
    .html-viewer-container .header {
        padding: 24px 16px;
    }

    .html-viewer-container .header h1 {
        font-size: 22px;
    }

    .html-viewer-container .header p {
        font-size: 13px;
    }

    .html-viewer-container .content {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .html-viewer-container .panel {
        min-height: 400px;
    }
}
